parent
7dd05d675c
commit
5332378419
|
@ -1327,14 +1327,15 @@ void spaces_to_tabs(Context& context, NormalParams params)
|
||||||
auto spaces_beg = it;
|
auto spaces_beg = it;
|
||||||
auto spaces_end = spaces_beg+1;
|
auto spaces_end = spaces_beg+1;
|
||||||
CharCount col = get_column(buffer, opt_tabstop, spaces_end.coord());
|
CharCount col = get_column(buffer, opt_tabstop, spaces_end.coord());
|
||||||
while (*spaces_end == ' ' and (col % tabstop) != 0)
|
while (spaces_end != end and
|
||||||
|
*spaces_end == ' ' and (col % tabstop) != 0)
|
||||||
{
|
{
|
||||||
++spaces_end;
|
++spaces_end;
|
||||||
++col;
|
++col;
|
||||||
}
|
}
|
||||||
if ((col % tabstop) == 0)
|
if ((col % tabstop) == 0)
|
||||||
spaces.push_back({spaces_beg.coord(), (spaces_end-1).coord()});
|
spaces.push_back({spaces_beg.coord(), (spaces_end-1).coord()});
|
||||||
else if (*spaces_end == '\t')
|
else if (spaces_end != end and *spaces_end == '\t')
|
||||||
spaces.push_back({spaces_beg.coord(), spaces_end.coord()});
|
spaces.push_back({spaces_beg.coord(), spaces_end.coord()});
|
||||||
it = spaces_end;
|
it = spaces_end;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
gg2l<a-@>
|
|
@ -0,0 +1 @@
|
||||||
|
hello
|
|
@ -0,0 +1 @@
|
||||||
|
hello
|
Loading…
Reference in New Issue
Block a user