Skip to content

Commit

Permalink
[doc.sections] recognize diff sections
Browse files Browse the repository at this point in the history
  • Loading branch information
tstack committed Oct 2, 2023
1 parent 8ed0eaf commit 9663b1f
Show file tree
Hide file tree
Showing 10 changed files with 13,957 additions and 13,343 deletions.
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ Features:
* Added the `config file-options` management command that
can be used to examine the options that will be applied
to a given file.
* When viewing a diff, the sections of the diff for each
file is recognized and shown in the breadcrumb bar. So,
you can see the file the focused line is in. You can
also jump to a particular file by focusing on the
breadcrumb bar, selecting the crumb, and then selecting
the desired file.

Bug Fixes:
* Binary data piped into stdin should now be treated the same
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ time_fmts.cc: ptimec$(BUILD_EXEEXT)

if HAVE_RE2C
%.cc: %.re
$(RE2C_V)$(RE2C_CMD) --bit-vectors -W --tags -8 -o $@ $<
$(RE2C_V)$(RE2C_CMD) --bit-vectors -W -8 -o $@ $<
$(REC2_V)test $@ -ef $(srcdir)/$*.cc || cp $@ $(srcdir)/$*.cc
endif

Expand Down
6 changes: 6 additions & 0 deletions src/data_scanner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,12 @@ static struct {
{
"zwsp",
},
{
"dffi",
},
{
"dfch",
},
};

const char* DNT_NAMES[DNT_MAX - DNT_KEY] = {
Expand Down
7 changes: 5 additions & 2 deletions src/data_scanner.hh
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,12 @@ enum data_token_t {
DT_GARBAGE,
DT_ZERO_WIDTH_SPACE,

DT_TERMINAL_MAX = DT_ZERO_WIDTH_SPACE + 1,
DT_DIFF_FILE_HEADER,
DT_DIFF_HUNK_HEADING,

DNT_KEY = 50,
DT_TERMINAL_MAX = DT_DIFF_HUNK_HEADING + 1,

DNT_KEY = 52,
DNT_PAIR,
DNT_VALUE,
DNT_ROW,
Expand Down
Loading

0 comments on commit 9663b1f

Please sign in to comment.