From 4ca49debb1abc2e7bbde75b92167d0823edbbb07 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Mon, 7 Sep 2020 22:13:09 -0400 Subject: [PATCH] Call uiWrite to insert blank lines It only used to use different code to avoid adding the blank line to the soft buffer. --- ui.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/ui.c b/ui.c index 676f969..9499b23 100644 --- a/ui.c +++ b/ui.c @@ -815,16 +815,6 @@ static void showAuto(void) { } } -static void insertBlank(struct Window *window) { - int lines = bufferPush(window->buffer, COLS, false, Cold, time(NULL), ""); - window->unreadHard += lines; - if (window->scroll) { - windowScroll(window, lines); - } else { - windowUpdate(); - } -} - static void keyCode(int code) { struct Window *window = windows.ptrs[windows.show]; uint id = window->id; @@ -847,7 +837,7 @@ static void keyCode(int code) { break; case KeyMetaD: edit(id, EditDeleteNextWord, 0); break; case KeyMetaF: edit(id, EditNextWord, 0); break; case KeyMetaL: bufferList(window->buffer); - break; case KeyMetaM: insertBlank(window); + break; case KeyMetaM: uiWrite(id, Cold, NULL, ""); break; case KeyMetaN: windowScrollHot(window, +1); break; case KeyMetaP: windowScrollHot(window, -1); break; case KeyMetaQ: edit(id, EditCollapse, 0);