about summary refs log tree commit diff
path: root/ui.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ui.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/ui.c b/ui.c
index a6f78da..2177f10 100644
--- a/ui.c
+++ b/ui.c
@@ -462,8 +462,7 @@ static void windowUpdate(void) {
 	size_t bottom = BufferCap - 1 - window->scroll + !!window->scroll;
 	for (size_t i = bottom; i < BufferCap; --i) {
 		const struct Line *line = bufferHard(window->buffer, i);
-		if (!line) continue;
-		if (line->heat < Cold && window->ignore) continue;
+		if (!line) break;
 		mainAdd(y, line->str);
 		if (!y--) break;
 	}
@@ -477,8 +476,7 @@ static void windowUpdate(void) {
 	y = MAIN_LINES - 1;
 	for (size_t i = BufferCap - 1; i < BufferCap; --i) {
 		const struct Line *line = bufferHard(window->buffer, i);
-		if (!line) continue;
-		if (line->heat < Cold && window->ignore) continue;
+		if (!line) break;
 		mainAdd(y, line->str);
 		if (--y < MAIN_LINES - SplitLines) break;
 	}
@@ -537,21 +535,19 @@ static void notify(uint id, const char *str) {
 void uiWrite(uint id, enum Heat heat, const time_t *src, const char *str) {
 	struct Window *window = windows.ptrs[windowFor(id)];
 	time_t ts = (src ? *src : time(NULL));
-	if (heat < Cold && window->ignore) {
-		window->unreadHard += bufferPush(window->buffer, COLS, heat, ts, str);
-		return;
-	}
 
 	int lines = 0;
-	if (!window->unreadSoft++) window->unreadHard = 0;
+	if (heat > Ice || !window->ignore) {
+		if (!window->unreadSoft++) window->unreadHard = 0;
+	}
 	if (window->mark && heat > Cold) {
 		if (!window->unreadWarm++) {
-			lines += bufferPush(window->buffer, COLS, Cold, 0, "");
+			lines += bufferPush(window->buffer, COLS, false, Cold, 0, "");
 		}
 		if (heat > window->heat) window->heat = heat;
 		statusUpdate();
 	}
-	lines += bufferPush(window->buffer, COLS, heat, ts, str);
+	lines += bufferPush(window->buffer, COLS, window->ignore, heat, ts, str);
 	window->unreadHard += lines;
 	if (window->scroll) windowScroll(window, lines);
 	if (window == windows.ptrs[windows.show]) windowUpdate();
@@ -579,7 +575,8 @@ static void resize(void) {
 	wclear(main);
 	wresize(main, MAIN_LINES, COLS);
 	for (uint num = 0; num < windows.len; ++num) {
-		bufferReflow(windows.ptrs[num]->buffer, COLS);
+		struct Window *window = windows.ptrs[num];
+		bufferReflow(window->buffer, COLS, window->ignore);
 	}
 	windowUpdate();
 }
@@ -756,6 +753,7 @@ void uiCloseNum(uint num) {
 
 static void toggleIgnore(struct Window *window) {
 	window->ignore ^= true;
+	bufferReflow(window->buffer, COLS, window->ignore);
 	windowUpdate();
 	statusUpdate();
 }
@@ -789,7 +787,7 @@ static void showAuto(void) {
 }
 
 static void insertBlank(struct Window *window) {
-	int lines = bufferPush(window->buffer, COLS, Cold, 0, "");
+	int lines = bufferPush(window->buffer, COLS, false, Cold, 0, "");
 	window->unreadHard += lines;
 	if (window->scroll) {
 		windowScroll(window, lines);
@@ -1015,7 +1013,7 @@ void uiLoad(const char *name) {
 			if (!time) break;
 			enum Heat heat = (version > 2 ? readTime(file) : Cold);
 			readString(file, &buf, &cap);
-			bufferPush(window->buffer, COLS, heat, time, buf);
+			bufferPush(window->buffer, COLS, window->ignore, heat, time, buf);
 		}
 	}
 
td> PS. Chris Kempson is a jerk. 2012-01-30Disable menu bar in GVimJune McEnroe 2012-01-30Set shiftwidth to 4 for LuaJune McEnroe 2012-01-29Don't show Syntastic errors automaticallyJune McEnroe 2012-01-28Update to Quicktask 1.1June McEnroe 2012-01-22Use space-test branch of quicktaskJune McEnroe 2012-01-22Enable syntax-based foldingJune McEnroe 2012-01-22Update quicktaskJune McEnroe 2012-01-22Revert "Add AutoClose"June McEnroe This reverts commit 2705f4b91a56caf4cf2b3b89b247580debd5d453. This fixes the delay when leaving insert mode 2012-01-22Revert "Disable powerline for now"June McEnroe This reverts commit 171b1aa0d1d445a1223d0d638f2798b780c3e1ce. 2012-01-22Revert "Add VCS repo directories to wildignore"June McEnroe This reverts commit f4cc36a0aca465eea866fa7131a19497d46e63f0. This fixes not being able to commit with vim-fugitive 2012-01-22Disable powerline for nowJune McEnroe 2012-01-22Update some pluginsJune McEnroe 2012-01-22Add VCS repo directories to wildignoreJune McEnroe 2012-01-22Map ,e and ,b to CtrlP file and buffer respectivelyJune McEnroe 2012-01-22Add vim-spaceJune McEnroe 2012-01-22Add AutoCloseJune McEnroe 2012-01-22Add binding for GundoJune McEnroe 2012-01-22Add GundoJune McEnroe 2012-01-22Add Jellybeans colorschemeJune McEnroe 2012-01-22Add syntasticJune McEnroe 2012-01-21Add PowerlineJune McEnroe 2012-01-21Add quicktaskJune McEnroe 2012-01-15Moved comments out of mapsJune McEnroe 2012-01-14Disable scrollbarsJune McEnroe