fixed cursor destruction on getLineNumberAtCursor() method to ZString.
This commit is contained in:
parent
52d3985ffa
commit
ab4da04de6
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user