aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--view.c2
-rw-r--r--view.h8
2 files changed, 5 insertions, 5 deletions
diff --git a/view.c b/view.c
index 6cac448..d13a968 100644
--- a/view.c
+++ b/view.c
@@ -560,7 +560,7 @@ void view_draw(View *view) {
continue;
} else if (len == 0) {
/* NUL byte encountered, store it and continue */
- cell = (Cell){ .data = "\x00", .len = 1, .width = 0 };
+ cell = (Cell){ .data = "\x00", .len = 1, .width = 2 };
} else {
for (size_t i = 0; i < len; i++)
cell.data[i] = cur[i];
diff --git a/view.h b/view.h
index 05ada2f..f8b6473 100644
--- a/view.h
+++ b/view.h
@@ -17,17 +17,17 @@ typedef struct Cursor Cursor;
typedef struct Selection Selection;
typedef struct {
- int width; /* display width i.e. number of columns ocupied by this character */
+ int width; /* display width i.e. number of columns occupied by this character */
size_t len; /* number of bytes the character displayed in this cell uses, for
- character which use more than 1 column to display, their lenght
- is stored in the leftmost cell wheras all following cells
+ characters which use more than 1 column to display, their length
+ is stored in the leftmost cell whereas all following cells
occupied by the same character have a length of 0. */
char data[16]; /* utf8 encoded character displayed in this cell (might be more than
one Unicode codepoint. might also not be the same as in the
underlying text, for example tabs get expanded */
unsigned int attr;
bool selected; /* whether this cell is part of a selected region */
- bool cursor; /* whether a cursor is currently locaated on the cell */
+ bool cursor; /* whether a cursor is currently located on the cell */
} Cell;
typedef struct Line Line;