Skip to content

Commit 921c001

Browse files
committed
Enable search in sections titles
Closes #1043
1 parent 7b596d3 commit 921c001

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

NEWS.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Improvements:
1616
- Keep cursor position when toggling file-filter in the main view.
1717
- Make errors visible in views showing Git output. (#1346)
1818
- Allow different colors for all references types.
19+
- Enable search in sections titles. (#1043)
1920

2021
tig-2.5.10
2122
----------

src/view.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,6 +1144,15 @@ view_column_grep(struct view *view, struct line *line)
11441144
if (!ok)
11451145
return false;
11461146

1147+
if (column_data.section) {
1148+
const char *text[] = {
1149+
column_data.section->opt.section.text,
1150+
NULL
1151+
};
1152+
1153+
return grep_text(view, text);
1154+
}
1155+
11471156
for (column = view->columns; column; column = column->next) {
11481157
const char *text[] = {
11491158
view_column_text(view, &column_data, column),

0 commit comments

Comments
 (0)