aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2015-12-26 18:42:01 +0100
committerThomas White <taw@bitwiz.org.uk>2015-12-26 18:42:01 +0100
commit512a21e10151e4c694a1aa4f7dfe8faf7eec5e52 (patch)
tree9c6532f160cb084f0cd1e62c7e03e51e3df62b71 /src
parent7bc3dc12dd7eb45a8bd28fdf020bcfd802ad91f0 (diff)
Debugging/comments
Diffstat (limited to 'src')
-rw-r--r--src/render.c2
-rw-r--r--src/sc_editor.c7
2 files changed, 7 insertions, 2 deletions
diff --git a/src/render.c b/src/render.c
index e7d24f6..eb74857 100644
--- a/src/render.c
+++ b/src/render.c
@@ -206,7 +206,7 @@ static void render_boxes(struct wrap_line *line, cairo_t *cr, ImageStore *is,
box = &line->boxes[j];
cairo_translate(cr, x_pos, 0.0);
- draw_outline(cr, box);
+ //draw_outline(cr, box);
switch ( line->boxes[j].type ) {
diff --git a/src/sc_editor.c b/src/sc_editor.c
index 1e273f5..463e090 100644
--- a/src/sc_editor.c
+++ b/src/sc_editor.c
@@ -441,6 +441,7 @@ void cur_box_diag(SCEditor *e)
printf("%c%i %i %i%c", pp, bx->offs_char, bx->len_chars,
bx->n_segs, pq);
}
+ printf("\n");
}
@@ -792,7 +793,8 @@ static void update_local(SCEditor *e, struct frame *fr, int line, int bn)
{
struct wrap_box *box = &fr->lines[line].boxes[bn];
- /* Shape the box again FIXME: Number of segments could change */
+ /* Shape the box again
+ * FIXME: Number of segments could change, need to PangoAnalyse again */
shape_box(box->cf->cf);
/* Update the segments */
@@ -931,6 +933,8 @@ static void do_backspace(struct frame *fr, SCEditor *e)
sps = e->cursor_pos;
struct wrap_box *sbox = &e->cursor_frame->lines[sln].boxes[sbx];
+ cur_box_diag(e);
+
move_cursor_back(e);
/* Delete may cross wrap boxes and maybe SCBlock boundaries */
@@ -966,6 +970,7 @@ static void do_backspace(struct frame *fr, SCEditor *e)
update_local(e, fr, sln, sbx);
fixup_cursor(e);
+ cur_box_diag(e);
sc_editor_redraw(e);
}