diff options
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 20 |
1 files changed, 13 insertions, 7 deletions
@@ -393,9 +393,6 @@ int shell_run(const char *cmd) { /* main */ -#define ODD_ATTR (FG_CYAN | BG_BLACK) -#define EVEN_ATTR (FG_WHITE | BG_BLACK) - void find_view_window(TxtLoc l, TxtLoc *start, TxtLoc *end, u32 lines) { u32 u = lines / 2; TxtLoc a = l; @@ -419,9 +416,9 @@ void draw(void *ctx) { TxtLoc start, end; find_view_window(eb->cur, &start, &end, LINES - 1); - VuiAttr norm = FG_CYAN | BG_BLACK; - VuiAttr sel = FG_BLACK | BG_CYAN; - VuiAttr txt = FG_WHITE | BG_BLACK; + VuiAttr norm = A_DEFAULT; + VuiAttr sel = norm | A_REVERSE; + VuiAttr txt = A_DEFAULT; vui_fill(' ', txt); { @@ -1089,6 +1086,15 @@ int main(int argc, const char **argv) { eb->cur = txt_delete_range(start, end); e.mode = 1; } break; + case 'J': { + TxtLoc l = end_of_line(eb->cur); + if (txt_byte(l) == '\n') { + do l = txt_delete_c(cnext(l)); + while (is_space(txt_chr(l))); + l = cprev(txt_insert_c(l, ' ')); + eb->cur = l; + } + } break; case 'c': { TxtLoc before = eb->cur; if (motion(&eb->cur, vui_key())) { @@ -1245,4 +1251,4 @@ int main(int argc, const char **argv) { vui_fini(); arena_free(&e.scratch); return 0; -} +}
\ No newline at end of file |
