From 559af669c77a3b3b6de0376f177ebbba5ebd0328 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 19 Jul 2022 22:47:39 +1000 Subject: Remove out-of-date column computation in show-whitespaces Now that we compute display buffer on whole lines, it does not make sense to compute the tab padding based off the window column position Fixes #4674 --- src/highlighters.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/highlighters.cc b/src/highlighters.cc index 4b9540b6..39fd28fd 100644 --- a/src/highlighters.cc +++ b/src/highlighters.cc @@ -1061,7 +1061,6 @@ private: const int tabstop = context.context.options()["tabstop"].get(); auto whitespaceface = context.context.faces()["Whitespace"]; const auto& buffer = context.context.buffer(); - auto win_column = context.setup.first_column; for (auto& line : display_buffer.lines()) { for (auto atom_it = line.begin(); atom_it != line.end(); ++atom_it) @@ -1085,8 +1084,7 @@ private: if (cp == '\t') { const ColumnCount column = get_column(buffer, tabstop, coord); - const ColumnCount count = tabstop - (column % tabstop) - - std::max(win_column - column, 0_col); + const ColumnCount count = tabstop - (column % tabstop); atom_it->replace(m_tab + String(m_tabpad[(CharCount)0], count - m_tab.column_length())); } else if (cp == ' ') -- cgit v1.2.3