mirror of
https://github.com/irssi/irssi.git
synced 2024-09-08 04:26:01 -04:00
bugfixes for multiple windows support :)
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1443 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
adb7eced39
commit
5d5b9cbc28
@ -464,10 +464,10 @@ static void view_draw(TEXT_BUFFER_VIEW_REC *view, GList *line,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* clear the rest of the view */
|
/* clear the rest of the view */
|
||||||
while (ypos < lines) {
|
while (lines > 0) {
|
||||||
wmove(view->window, ypos, 0);
|
wmove(view->window, ypos, 0);
|
||||||
wclrtoeol(view->window);
|
wclrtoeol(view->window);
|
||||||
ypos++;
|
ypos++; lines--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -543,7 +543,7 @@ static int view_scroll(TEXT_BUFFER_VIEW_REC *view, GList **lines, int *subline,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (scroll_visible && realcount != 0) {
|
if (scroll_visible && realcount != 0 && view->window != NULL) {
|
||||||
if (realcount <= -view->height || realcount >= view->height) {
|
if (realcount <= -view->height || realcount >= view->height) {
|
||||||
/* scrolled more than screenful, redraw the
|
/* scrolled more than screenful, redraw the
|
||||||
whole view */
|
whole view */
|
||||||
@ -650,6 +650,7 @@ void textbuffer_view_scroll(TEXT_BUFFER_VIEW_REC *view, int lines)
|
|||||||
view->ypos += lines < 0 ? count : -count;
|
view->ypos += lines < 0 ? count : -count;
|
||||||
view->bottom = view_is_bottom(view);
|
view->bottom = view_is_bottom(view);
|
||||||
|
|
||||||
|
if (view->window != NULL)
|
||||||
screen_refresh(view->window);
|
screen_refresh(view->window);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -757,6 +758,7 @@ static void view_insert_line(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line)
|
|||||||
view->ypos -= linecount;
|
view->ypos -= linecount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (view->window != NULL) {
|
||||||
ypos = view->ypos+1 - view->cache->last_linecount;
|
ypos = view->ypos+1 - view->cache->last_linecount;
|
||||||
if (ypos >= 0)
|
if (ypos >= 0)
|
||||||
subline = 0;
|
subline = 0;
|
||||||
@ -764,8 +766,12 @@ static void view_insert_line(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line)
|
|||||||
subline = -ypos;
|
subline = -ypos;
|
||||||
ypos = 0;
|
ypos = 0;
|
||||||
}
|
}
|
||||||
view_line_draw(view, line, subline, ypos, view->height-ypos);
|
view_line_draw(view, line, subline, ypos,
|
||||||
|
view->height - ypos);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (view->window != NULL)
|
||||||
screen_refresh(view->window);
|
screen_refresh(view->window);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -913,6 +919,7 @@ static void view_remove_line(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line,
|
|||||||
}
|
}
|
||||||
|
|
||||||
view->bottom = view_is_bottom(view);
|
view->bottom = view_is_bottom(view);
|
||||||
|
if (view->window != NULL)
|
||||||
screen_refresh(view->window);
|
screen_refresh(view->window);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1011,11 +1018,10 @@ void textbuffer_view_set_window(TEXT_BUFFER_VIEW_REC *view, WINDOW *window)
|
|||||||
/* Redraw a view to window */
|
/* Redraw a view to window */
|
||||||
void textbuffer_view_redraw(TEXT_BUFFER_VIEW_REC *view)
|
void textbuffer_view_redraw(TEXT_BUFFER_VIEW_REC *view)
|
||||||
{
|
{
|
||||||
if (view->window == NULL)
|
if (view->window != NULL) {
|
||||||
return;
|
|
||||||
|
|
||||||
view_draw_top(view, view->height);
|
view_draw_top(view, view->height);
|
||||||
screen_refresh(view->window);
|
screen_refresh(view->window);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int line_cache_check_remove(void *key, LINE_CACHE_REC *cache,
|
static int line_cache_check_remove(void *key, LINE_CACHE_REC *cache,
|
||||||
|
Loading…
Reference in New Issue
Block a user