From 89ad0c63a47d193cb81967ad7e98789655a36d68 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sun, 7 Aug 2011 10:20:26 +1000 Subject: Do not extend decorations when appending to end of document. Bug #3378718. --- src/Decoration.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/Decoration.cxx b/src/Decoration.cxx index 90bde57f2..24632d7c1 100644 --- a/src/Decoration.cxx +++ b/src/Decoration.cxx @@ -126,9 +126,13 @@ bool DecorationList::FillRange(int &position, int value, int &fillLength) { } void DecorationList::InsertSpace(int position, int insertLength) { + const bool atEnd = position == lengthDocument; lengthDocument += insertLength; for (Decoration *deco=root; deco; deco = deco->next) { deco->rs.InsertSpace(position, insertLength); + if (atEnd) { + deco->rs.FillRange(position, 0, insertLength); + } } } -- cgit v1.2.3 From 706b3f5a9b8c7192983d20ff726f040cc0fa8966 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 10 Aug 2011 19:53:34 +1000 Subject: Fix for wrong cursor near selection ends when scrolled horizontally. Bug #3389055. --- src/Editor.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index 452666be7..f6b1ea308 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -6020,20 +6020,20 @@ bool Editor::PositionInSelection(int pos) { bool Editor::PointInSelection(Point pt) { SelectionPosition pos = SPositionFromLocation(pt, false, true); - int xPos = XFromPosition(pos); + Point ptPos = LocationFromPosition(pos); for (size_t r=0; r xPos) { + if (pt.x > ptPos.x) { hit = false; } } -- cgit v1.2.3 From f90956e86fd0cf150b241838f1b03870e043d9cb Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 27 Aug 2011 10:42:47 +1000 Subject: Basing default eol mode on _WIN32 instead of __unix__ as OS X does not define __unix__. --- src/Document.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Document.cxx b/src/Document.cxx index 2729d3d7b..5c05aa5e0 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -87,10 +87,10 @@ void LexInterface::Colourise(int start, int end) { Document::Document() { refCount = 0; -#ifdef __unix__ - eolMode = SC_EOL_LF; -#else +#ifdef _WIN32 eolMode = SC_EOL_CRLF; +#else + eolMode = SC_EOL_LF; #endif dbcsCodePage = 0; stylingBits = 5; -- cgit v1.2.3 From 22edeb6d8fd99407534b4f630266ed5c904cf6a1 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sun, 4 Sep 2011 09:47:19 +1000 Subject: Cast to ensure comparison valid. --- src/Editor.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index f6b1ea308..347f27318 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -8378,7 +8378,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { return vs.caretStyle; case SCI_SETCARETWIDTH: - if (wParam <= 0) + if (static_cast(wParam) <= 0) vs.caretWidth = 0; else if (wParam >= 3) vs.caretWidth = 3; -- cgit v1.2.3