Skip to content

Commit

Permalink
Enable search in sections titles
Browse files Browse the repository at this point in the history
Closes #1043
  • Loading branch information
koutcher committed Sep 29, 2024
1 parent 7b596d3 commit 921c001
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions NEWS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Improvements:
- Keep cursor position when toggling file-filter in the main view.
- Make errors visible in views showing Git output. (#1346)
- Allow different colors for all references types.
- Enable search in sections titles. (#1043)

tig-2.5.10
----------
Expand Down
9 changes: 9 additions & 0 deletions src/view.c
Original file line number Diff line number Diff line change
Expand Up @@ -1144,6 +1144,15 @@ view_column_grep(struct view *view, struct line *line)
if (!ok)
return false;

if (column_data.section) {
const char *text[] = {
column_data.section->opt.section.text,
NULL
};

return grep_text(view, text);
}

for (column = view->columns; column; column = column->next) {
const char *text[] = {
view_column_text(view, &column_data, column),
Expand Down

0 comments on commit 921c001

Please sign in to comment.