aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/PerLine.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2014-02-21 09:21:19 +1100
committerNeil <nyamatongwe@gmail.com>2014-02-21 09:21:19 +1100
commit64f72043ae05b56a26ee6302f8e2e7e5b71c4d9f (patch)
treea42d5ecf469a523b0496c23ca233dd1ed2a1a456 /src/PerLine.cxx
parentd9a10fb1fce64682123d451b7973429b46bb34c0 (diff)
downloadscintilla-mirror-64f72043ae05b56a26ee6302f8e2e7e5b71c4d9f.tar.gz
Bug [#1577]. Deleting a whole line deletes the annotations on that line instead
of the annotations on the next line.
Diffstat (limited to 'src/PerLine.cxx')
-rw-r--r--src/PerLine.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/PerLine.cxx b/src/PerLine.cxx
index 7bf892240..8b0dbc44b 100644
--- a/src/PerLine.cxx
+++ b/src/PerLine.cxx
@@ -370,9 +370,9 @@ void LineAnnotation::InsertLine(int line) {
}
void LineAnnotation::RemoveLine(int line) {
- if (annotations.Length() && (line < annotations.Length())) {
- delete []annotations[line];
- annotations.Delete(line);
+ if (annotations.Length() && (line > 0) && (line <= annotations.Length())) {
+ delete []annotations[line-1];
+ annotations.Delete(line-1);
}
}