~strahinja/poe

7e7b946c4b12c00ee10f15b8014348a2f1050113 — Страхиња Радић 1 year, 4 months ago 6c6da77 v1.01
Fix: properly update first shown column when C-R/C-T in lines longer than edit box width

Signed-off-by: Страхиња Радић <contact@strahinja.org>
1 files changed, 6 insertions(+), 0 deletions(-)

M poe.c
M poe.c => poe.c +6 -0
@@ 1330,6 1330,8 @@ move_prev_word(struct DrawState* state)
	state->input_column = i;
	state->input_display_column = display_length(state, state->input_buffer[
				state->input_row].text, state->input_column);
	if (state->input_display_column < state->input_first_shown_column)
		state->input_first_shown_column = state->input_display_column;
}

void 


@@ 1352,6 1354,10 @@ move_next_word(struct DrawState* state)
	state->input_column = i;
	state->input_display_column = display_length(state, state->input_buffer[
				state->input_row].text, state->input_column);
	if (state->input_display_column - state->input_first_shown_column
			> EDIT_WIDTH-4)
		state->input_first_shown_column = state->input_display_column
			- EDIT_WIDTH+4;
}

void