Flag tabs if possible in the grid cell so they can be preserved on

copying and capture-pane. From Alexander Arch in GitHub issue 4201.
This commit is contained in:
nicm
2024-10-25 15:00:18 +00:00
parent 63582c154c
commit fdbc6cdea5
6 changed files with 84 additions and 16 deletions

View File

@ -345,6 +345,8 @@ grid_reader_cell_equals_data(const struct grid_cell *gc,
{
if (gc->flags & GRID_FLAG_PADDING)
return (0);
if (gc->flags & GRID_FLAG_TAB && ud->size == 1 && *ud->data == '\t')
return (1);
if (gc->data.size != ud->size)
return (0);
return (memcmp(gc->data.data, ud->data, gc->data.size) == 0);