diff options
author | Thomas White <taw@bitwiz.org.uk> | 2013-08-22 23:28:11 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2013-08-22 23:28:11 +0200 |
commit | 05662243972af0a5db0c62f19540b95e68eee8a5 (patch) | |
tree | 3b0b5fe1394bb033dd52f44921703a84a928f1c1 /src/mainwindow.c | |
parent | 378496d1f20de36489b9fdc3a76fbe9441dafd07 (diff) |
Handle SC offsets for prologue (non-editable) boxes
Diffstat (limited to 'src/mainwindow.c')
-rw-r--r-- | src/mainwindow.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mainwindow.c b/src/mainwindow.c index 578640d..1171d77 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -829,6 +829,12 @@ static void draw_caret(cairo_t *cr, struct frame *fr, int pos) double cx, clow, chigh; const double t = 1.8; + /* Fix up cursor position if necessary */ + if ( fr->pos < fr->lines[0].sc_offset ) { + fr->pos = fr->lines[0].sc_offset; + pos = fr->pos; + } + get_cursor_pos(fr, pos, &xposd, &yposd, &line_height); cx = fr->x + xposd; |