ledit

Text editor (WIP)
git clone git://lumidify.org/ledit.git (fast, but not encrypted)
git clone https://lumidify.org/git/ledit.git (encrypted, but very slow)
Log | Files | Refs | README | LICENSE

commit 42118fa8413ad5bd8be9d6d9b54b3b233a68df5f
parent 920ff77cf2e64f74df86d0a415cd6e3180a36c8d
Author: lumidify <nobody@lumidify.org>
Date:   Mon,  8 Nov 2021 09:11:40 +0100

Remove warnings

Diffstat:
Mkeys_basic.c | 23+----------------------
Mledit.c | 1+
2 files changed, 2 insertions(+), 22 deletions(-)

diff --git a/keys_basic.c b/keys_basic.c @@ -115,7 +115,6 @@ static void get_new_line_softline( ledit_buffer *buffer, int cur_line, int cur_index, int movement, int *new_line_ret, int *new_softline_ret ); -static void move_cursor_in_line_dir(ledit_buffer *buffer, int dir, int allow_illegal_index); static void move_cursor_logically(ledit_buffer *buffer, int movement_dir, int allow_illegal_index); static void change_cb(ledit_buffer *buffer, int line, int char_pos, enum key_type type); static void push_undo_empty_insert(ledit_buffer *buffer, int line, int index, int start_group); @@ -1382,27 +1381,7 @@ return_key(ledit_buffer *buffer, char *text, int len) { return (struct action){ACTION_NONE, NULL}; } -static void -move_cursor_in_line_dir(ledit_buffer *buffer, int movement_dir, int allow_illegal_index) { - PangoDirection dir; - int x, sli; - ledit_line *cur_line = ledit_buffer_get_line(buffer, buffer->cur_line); - pango_layout_index_to_line_x(cur_line->layout, buffer->cur_index, 0, &sli, &x); - PangoLayoutLine *sl = pango_layout_get_line_readonly(cur_line->layout, sli); - dir = sl->resolved_dir; - if (dir == PANGO_DIRECTION_RTL || dir == PANGO_DIRECTION_WEAK_RTL) { - if (movement_dir < 0) - move_cursor_left_right(buffer, 1, allow_illegal_index); - else - move_cursor_left_right(buffer, -1, allow_illegal_index); - } else { - if (movement_dir < 0) - move_cursor_left_right(buffer, -1, allow_illegal_index); - else - move_cursor_left_right(buffer, 1, allow_illegal_index); - } -} - +/* FIXME: just just ledit_buffer_prev_cursor_pos */ static void move_cursor_logically(ledit_buffer *buffer, int movement_dir, int allow_illegal_index) { PangoDirection dir = PANGO_DIRECTION_LTR; diff --git a/ledit.c b/ledit.c @@ -136,6 +136,7 @@ mainloop(void) { /* redraw because text may be pasted, then fall through and let window handle the event */ need_redraw = 1; + /* fall through */ case SelectionRequest: ledit_window_clipboard_event(buffer->window, &event); break;