aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2008-08-03 08:19:03 +0000
committernyamatongwe <unknown>2008-08-03 08:19:03 +0000
commite13f8db1f26e9b1c732d94def9eb23339c876c97 (patch)
tree94b62a92bd4269f1a4aabac0851e91e9159142b2
parent7c368867f07b9155ab702398f2247eddd87d6de6 (diff)
downloadscintilla-mirror-e13f8db1f26e9b1c732d94def9eb23339c876c97.tar.gz
For bug #2030324 codument that HideLines can not hide line 0 and
stop this from causing crash in code.
-rw-r--r--doc/ScintillaDoc.html2
-rw-r--r--src/Editor.cxx3
2 files changed, 3 insertions, 2 deletions
diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html
index ee4e1670d..90d337529 100644
--- a/doc/ScintillaDoc.html
+++ b/doc/ScintillaDoc.html
@@ -4178,7 +4178,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
The first two messages mark a range of lines as visible or invisible and then redraw the
display. The third message reports on the visible state of a line and returns 1 if it is
visible and 0 if it is not visible. These messages have no effect on fold levels or fold
- flags.</p>
+ flags. The first line can not be hidden.</p>
<p><b id="SCI_SETFOLDLEVEL">SCI_SETFOLDLEVEL(int line, int level)</b><br />
<b id="SCI_GETFOLDLEVEL">SCI_GETFOLDLEVEL(int line)</b><br />
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 95664e2b1..c72fc96d0 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -7027,7 +7027,8 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
break;
case SCI_HIDELINES:
- cs.SetVisible(wParam, lParam, false);
+ if (wParam > 0)
+ cs.SetVisible(wParam, lParam, false);
SetScrollBars();
Redraw();
break;