added getLineNumberAtCursor() method to ZString.
This commit is contained in:
parent
d6d16a1b7f
commit
52d3985ffa
@ -575,4 +575,13 @@ namespace coreutils {
|
||||
return temp;
|
||||
}
|
||||
|
||||
int ZString::getLineNumberAtCursor() {
|
||||
int line = 1;
|
||||
while(cursor != data)
|
||||
if(*cursor-- == '\n')
|
||||
++line;
|
||||
return line;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user