aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-11-13 22:17:13 +0100
committerThomas Voss <mail@thomasvoss.com> 2024-11-13 22:17:13 +0100
commitb3fd0e0a2228c2501a14670440b48bbe6f036f07 (patch)
tree78c1750e16f2149bd1360a284c7ca35353d2d818 /src
parent0cf413c8a6a060fbc532f645202b01cf8ef27fef (diff)
Default back to -b from -Lv3.0.0
Diffstat (limited to 'src')
-rw-r--r--src/globals.h2
-rw-r--r--src/main.c4
-rw-r--r--src/work.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/globals.h b/src/globals.h
index f0ed91b..fea375d 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -22,11 +22,11 @@ enum {
};
typedef struct {
- bool b : 1;
bool c : 1;
unsigned H : 2;
bool i : 1;
bool l : 1;
+ bool L : 1;
bool p : 1;
bool s : 1;
bool U : 1;
diff --git a/src/main.c b/src/main.c
index 1679da1..302c972 100644
--- a/src/main.c
+++ b/src/main.c
@@ -84,7 +84,7 @@ main(int argc, char **argv)
break;
switch (opt) {
case 'b':
- flags.b = true;
+ flags.L = false;
#if !GIT_GRAB
flags.do_header = true;
#endif
@@ -122,7 +122,7 @@ main(int argc, char **argv)
flags.l = true;
break;
case 'L':
- flags.b = false;
+ flags.L = true;
#if !GIT_GRAB
flags.do_header = true;
#endif
diff --git a/src/work.c b/src/work.c
index b6433b8..0fdf6eb 100644
--- a/src/work.c
+++ b/src/work.c
@@ -359,7 +359,7 @@ write_match_to_buffer(u8view_t sv, u8view_t *hl)
char offset[/* len(INT64_MAX - 1) */ 19];
pos_state_t ps = {.buf = {baseptr, PTRDIFF_MAX}};
- if (flags.b) {
+ if (!flags.L) {
offsetsz = sprintf(offset, "%td", sv.p - baseptr);
array_extend_sv(buf, COL_LN);
array_extend(buf, offset, offsetsz);