Fix tab offset
This commit is contained in:
parent
f8e0a06a62
commit
99c3e8cc0c
1 changed files with 1 additions and 1 deletions
|
@ -153,7 +153,7 @@ count_type Treap::get_tab_offset(position p) {
|
|||
string line = get_line(p.r, false);
|
||||
for(count_type i = 0; i + tab_offset < p.c; ++i) {
|
||||
if(line[i] == '\t')
|
||||
tab_offset += ((i+tab_offset-1) % TAB_SIZE);
|
||||
tab_offset += TAB_SIZE - (i+tab_offset) % TAB_SIZE - 1;
|
||||
if(i + tab_offset > p.c)
|
||||
tab_offset -= i + tab_offset - p.c;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue