aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2015-02-15 22:28:25 +0100
committerThomas White <taw@bitwiz.org.uk>2015-02-15 22:28:25 +0100
commit9ae1a42a0f0c63798c31272a71e326c9abb12b96 (patch)
tree6df566b98025ee4b59d7656bdbe47c03350aa93e /src
parentfb32032705ef68b79aa6814a7f754e06b0558e3d (diff)
Fix cursor movement through empty boxes
Diffstat (limited to 'src')
-rw-r--r--src/sc_editor.c2
-rw-r--r--src/shape.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/sc_editor.c b/src/sc_editor.c
index 8f42c69..da66ce4 100644
--- a/src/sc_editor.c
+++ b/src/sc_editor.c
@@ -148,7 +148,7 @@ static void move_cursor_back(SCEditor *e)
cp--;
}
} else {
- cp = 1;
+ cp = 0;
}
}
diff --git a/src/shape.c b/src/shape.c
index 9d6a2ac..4ec870b 100644
--- a/src/shape.c
+++ b/src/shape.c
@@ -118,6 +118,7 @@ static void add_nothing_box(struct wrap_line *line, SCBlock *scblock,
box->offs_char = offs;
box->space = sp;
box->width = 0;
+ box->len_chars = 1;
box->ascent = sc_interp_get_ascent(scin);
box->height = sc_interp_get_height(scin);
box->filename = NULL;