Created
June 9, 2014 12:29
-
-
Save stefan991/92a5f9c8f3670f03b0f2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/nvim/api/private/redraw.c b/src/nvim/api/private/redraw.c | |
index 1ea9bbb..e84e374 100644 | |
--- a/src/nvim/api/private/redraw.c | |
+++ b/src/nvim/api/private/redraw.c | |
@@ -101,6 +101,31 @@ void redraw_delete_line(uint64_t channel_id, win_T *window, | |
DICTIONARY_OBJ(event_data)); | |
} | |
+void redraw_win_end(uint64_t channel_id, | |
+ win_T *window, | |
+ char marker, | |
+ char fill, | |
+ int row, | |
+ int endrow) | |
+{ | |
+ if (false) { | |
+ return; | |
+ } | |
+ | |
+ char marker_str[] = {marker, NUL}; | |
+ char fill_str[] = {fill, NUL}; | |
+ | |
+ Dictionary event_data = {0, 0, 0}; | |
+ PUT(event_data, "window_id", INTEGER_OBJ(window->handle)); | |
+ PUT(event_data, "marker", STRING_OBJ((const char *)&marker_str)); | |
+ PUT(event_data, "fill", STRING_OBJ((const char *)&fill_str)); | |
+ PUT(event_data, "row", INTEGER_OBJ(row - W_WINROW(window))); | |
+ PUT(event_data, "endrow", INTEGER_OBJ(endrow - W_WINROW(window))); | |
+ channel_send_event(channel_id, | |
+ "redraw:win_end", | |
+ DICTIONARY_OBJ(event_data)); | |
+} | |
+ | |
void redraw_update_line(uint64_t channel_id, | |
win_T *window, | |
UpdateLineWidths *widths, | |
diff --git a/src/nvim/screen.c b/src/nvim/screen.c | |
index d272fdd..8f618ed 100644 | |
--- a/src/nvim/screen.c | |
+++ b/src/nvim/screen.c | |
@@ -1776,6 +1776,11 @@ static void win_draw_end(win_T *wp, int c1, int c2, int r | |
c1, c2, hl_attr(hl)); | |
} | |
set_empty_rows(wp, row); | |
+ | |
+ if (current_window) { | |
+ // TODO(stefan991): handle higlight (parameter hl) | |
+ redraw_win_end(0, current_window, c1, c2, row, wp->w_height); | |
+ } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment