mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
Ticket #1956 (mcedit: moving cursor to the empty last line problem)
fixed cursor movement in empty last line. Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
This commit is contained in:
parent
98e4c93e5c
commit
519e2a30cb
@ -2133,7 +2133,8 @@ static void edit_left_char_move_cmd (WEdit * edit)
|
|||||||
= FALSE - move down
|
= FALSE - move down
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
edit_move_updown (WEdit * edit, unsigned long i, int scroll, gboolean direction) {
|
edit_move_updown (WEdit * edit, unsigned long i, int scroll, gboolean direction)
|
||||||
|
{
|
||||||
unsigned long p;
|
unsigned long p;
|
||||||
unsigned long l = (direction)
|
unsigned long l = (direction)
|
||||||
? edit->curs_line
|
? edit->curs_line
|
||||||
@ -2164,8 +2165,10 @@ edit_move_updown (WEdit * edit, unsigned long i, int scroll, gboolean direction)
|
|||||||
edit_move_to_prev_col (edit, p);
|
edit_move_to_prev_col (edit, p);
|
||||||
|
|
||||||
/* search start of current multibyte char (like CJK) */
|
/* search start of current multibyte char (like CJK) */
|
||||||
edit_right_char_move_cmd (edit);
|
if (edit->curs1 + 1 < edit->last_byte) {
|
||||||
edit_left_char_move_cmd (edit);
|
edit_right_char_move_cmd (edit);
|
||||||
|
edit_left_char_move_cmd (edit);
|
||||||
|
}
|
||||||
|
|
||||||
edit->search_start = edit->curs1;
|
edit->search_start = edit->curs1;
|
||||||
edit->found_len = 0;
|
edit->found_len = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user