fixed cursor destruction on getLineNumberAtCursor() method to ZString.
This commit is contained in:
1 parent
52d3985ffa
commit
ab4da04de6
1 file changed
+3
-2
+3
-2
@@ -576,9 +576,10 @@ namespace coreutils {
|
||||
}
|
||||
|
||||
int ZString::getLineNumberAtCursor() {
|
||||
char *temp = cursor;
|
||||
int line = 1;
|
||||
while(cursor != data)
|
||||
if(*cursor-- == '\n')
|
||||
while(temp != data)
|
||||
if(*temp-- == '\n')
|
||||
++line;
|
||||
return line;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user