From 1b0eba41a626438fa261efcac21e356cf338fdf6 Mon Sep 17 00:00:00 2001 From: fundon Date: Sun, 8 Feb 2015 17:18:28 +0800 Subject: [PATCH] fix softWrapAtPreferredLineLength bug, #256 --- lib/minimap-element.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/minimap-element.coffee b/lib/minimap-element.coffee index e366a643..f96ce79b 100644 --- a/lib/minimap-element.coffee +++ b/lib/minimap-element.coffee @@ -320,14 +320,14 @@ class MinimapElement extends HTMLElement if @adjustToSoftWrap lineLength = atom.config.get('editor.preferredLineLength') softWrap = atom.config.get('editor.softWrap') + softWrapAtPreferredLineLength = atom.config.get('editor.softWrapAtPreferredLineLength') width = lineLength * @minimap.getCharWidth() - if softWrap and lineLength and width < @width + if softWrap && softWrapAtPreferredLineLength and lineLength and width < @width @marginRight = width - @width + canvasWidth = width else @marginRight = null - - canvasWidth = width else delete @marginRight