mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
extract: number of spaces after the tab shouldn't include the tab cell itself
This fixes an off by one, where we sometimes "ate" an extra space when extracting contents with tabs. This happened if the tab (and its subsequent spaces) were followed by an additional space. Closes #2194
This commit is contained in:
parent
7ed36c1033
commit
96605bf52f
2 changed files with 5 additions and 2 deletions
|
|
@ -98,8 +98,11 @@
|
||||||
|
|
||||||
* URL labels misplaces when URL contains double-width characters
|
* URL labels misplaces when URL contains double-width characters
|
||||||
([#2179][2179]).
|
([#2179][2179]).
|
||||||
|
* One space too much consumed when copying (or pipe:ing) contents with
|
||||||
|
tabs ([#2194][2194])
|
||||||
|
|
||||||
[2179]: https://codeberg.org/dnkl/foot/issues/2179
|
[2179]: https://codeberg.org/dnkl/foot/issues/2179
|
||||||
|
[2194]: https://codeberg.org/dnkl/foot/issues/2194
|
||||||
|
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
|
||||||
|
|
@ -256,8 +256,8 @@ extract_one(const struct terminal *term, const struct row *row,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
xassert(next_tab_stop >= col);
|
if (next_tab_stop > col)
|
||||||
ctx->tab_spaces_left = next_tab_stop - col;
|
ctx->tab_spaces_left = next_tab_stop - col - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue