aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2017-06-13 14:40:47 +1000
committerNeil <nyamatongwe@gmail.com>2017-06-13 14:40:47 +1000
commit802f2e07e2dd89854517c803d7b8d22fb737200d (patch)
tree441c4b80b9ed9f1bede511de3b22f87d8cb882ce /src
parent9a3abeb1a7d44a699358e1cd7c817546f04f7339 (diff)
downloadscintilla-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.
Diffstat (limited to 'src')
-rw-r--r--src/Editor.cxx14
1 files changed, 10 insertions, 4 deletions
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