diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2014-03-27 20:08:54 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2014-03-27 20:08:54 +0000 |
commit | 119b8af2db392c85eb07d0aefbadeda62f1b1cc9 (patch) | |
tree | ab86e48f5f8219fdfdb446735d88bf326cfdda43 /gtk | |
parent | ed1ea8e6eec45123b27d6f74b9192271526f2f02 (diff) | |
parent | 7bcefbf72dee4cb60fa51ffc9eb4e0ab26ddab75 (diff) | |
download | netsurf-119b8af2db392c85eb07d0aefbadeda62f1b1cc9.tar.gz netsurf-119b8af2db392c85eb07d0aefbadeda62f1b1cc9.tar.bz2 |
Merge remote-tracking branch 'achal/fix-2098'
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/window.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/gtk/window.c b/gtk/window.c index 2da346b33..994c6a2ee 100644 --- a/gtk/window.c +++ b/gtk/window.c @@ -1154,9 +1154,21 @@ static void gui_window_place_caret(struct gui_window *g, int x, int y, int heigh { nsgtk_redraw_caret(g); + height -= 2; + y += 1; + + if (y < clip->y0) { + height -= clip->y0 - y + 1; + y = clip->y0 - 1; + } + + if (y + height > clip->y1) { + height = clip->y1 - y + 1; + } + g->caretx = x; - g->carety = y + 1; - g->careth = height - 2; + g->carety = y; + g->careth = height; nsgtk_redraw_caret(g); |