diff options
author | Neil <nyamatongwe@gmail.com> | 2017-06-13 14:40:47 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2017-06-13 14:40:47 +1000 |
commit | 802f2e07e2dd89854517c803d7b8d22fb737200d (patch) | |
tree | 441c4b80b9ed9f1bede511de3b22f87d8cb882ce | |
parent | 9a3abeb1a7d44a699358e1cd7c817546f04f7339 (diff) | |
download | scintilla-mirror-802f2e07e2dd89854517c803d7b8d22fb737200d.tar.gz |
Backport: Bug [#1949]. Fix drawing failure in wrap mode for delete to start/end of line.
Backport of changeset 6313:82cb780a04d1.
-rw-r--r-- | doc/ScintillaHistory.html | 5 | ||||
-rw-r--r-- | src/Editor.cxx | 14 |
2 files changed, 15 insertions, 4 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 57290ede4..ed6a6d674 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -540,6 +540,11 @@ <a href="http://sourceforge.net/p/scintilla/bugs/1919/">Bug #1919</a>. </li> <li> + Fix drawing failure when in wrap mode for delete to start/end of line which + affects later lines but did not redraw them. + <a href="http://sourceforge.net/p/scintilla/bugs/1949/">Bug #1949</a>. + </li> + <li> On Qt, mouse tracking is reenabled when the window is reshown. <a href="http://sourceforge.net/p/scintilla/bugs/1948/">Bug #1948</a>. </li> diff --git a/src/Editor.cxx b/src/Editor.cxx index 9020a7051..4b5ecadc2 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -818,8 +818,11 @@ void Editor::MovedCaret(SelectionPosition newPos, SelectionPosition previousPos, const Sci::Line currentLine = pdoc->LineFromPosition(newPos.Position()); if (ensureVisible) { // In case in need of wrapping to ensure DisplayFromDoc works. - if (currentLine >= wrapPending.start) - WrapLines(WrapScope::wsAll); + if (currentLine >= wrapPending.start) { + if (WrapLines(WrapScope::wsAll)) { + Redraw(); + } + } XYScrollPosition newXY = XYScrollToMakeVisible( SelectionRange(posDrag.IsValid() ? posDrag : newPos), xysDefault); if (previousPos.IsValid() && (newXY.xOffset == xOffset)) { @@ -5290,8 +5293,11 @@ Sci::Line Editor::ContractedFoldNext(Sci::Line lineStart) const { void Editor::EnsureLineVisible(Sci::Line lineDoc, bool enforcePolicy) { // In case in need of wrapping to ensure DisplayFromDoc works. - if (lineDoc >= wrapPending.start) - WrapLines(WrapScope::wsAll); + if (lineDoc >= wrapPending.start) { + if (WrapLines(WrapScope::wsAll)) { + Redraw(); + } + } if (!cs.GetVisible(lineDoc)) { // Back up to find a non-blank line |