summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-02-23 15:11:40 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-02-23 15:11:40 -0500
commitc101b231458da51767a79fb4b92304b1c76ef5e9 (patch)
treeabb11d4fd71ec2e29ba35cd1664e298ccd788f44
parent28403de81a1688e5a88a0052f948da66f606f0cc (diff)
fix gcc warnings
-rw-r--r--menu.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/menu.c b/menu.c
index 497fbba..c0ff5f4 100644
--- a/menu.c
+++ b/menu.c
@@ -54,6 +54,9 @@ static void menu_close(Ted *ted) {
case MENU_GOTO_DEFINITION:
tag_selector_close(ted);
break;
+ case MENU_GOTO_LINE:
+ buffer_clear(&ted->line_buffer);
+ break;
}
ted->menu = MENU_NONE;
ted->selector_open = NULL;
@@ -211,7 +214,7 @@ static void menu_update(Ted *ted) {
long line_number = strtol(contents, &end, 0);
TextBuffer *buffer = ted->prev_active_buffer;
if (line_number > 0 && *end == '\0' && line_number <= (long)buffer->nlines) {
- BufferPos pos = {line_number - 1, 0};
+ BufferPos pos = {(u32)line_number - 1, 0};
if (line_buffer->line_buffer_submitted) {
// let's go there!