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() {
|
int ZString::getLineNumberAtCursor() {
|
||||||
|
char *temp = cursor;
|
||||||
int line = 1;
|
int line = 1;
|
||||||
while(cursor != data)
|
while(temp != data)
|
||||||
if(*cursor-- == '\n')
|
if(*temp-- == '\n')
|
||||||
++line;
|
++line;
|
||||||
return line;
|
return line;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user