mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-24 04:02:06 +03:00
* edit.c (edit_move_to_column): Remove, use
edit_move_to_prev_col() instead.
This commit is contained in:
parent
c935eaa6c2
commit
78155218a6
@ -1,5 +1,8 @@
|
||||
2002-12-08 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* edit.c (edit_move_to_column): Remove, use
|
||||
edit_move_to_prev_col() instead.
|
||||
|
||||
* edit.c: Commit the rest of the position saving code.
|
||||
(edit_load_position): New function, load position.
|
||||
(edit_save_position): New function, save position.
|
||||
|
18
edit/edit.c
18
edit/edit.c
@ -106,6 +106,8 @@ static char *option_chars_move_whole_word =
|
||||
|
||||
static int push_action_disabled = 0;
|
||||
|
||||
static void edit_move_to_prev_col (WEdit *edit, long p);
|
||||
|
||||
#ifndef NO_INLINE_GETBYTE
|
||||
|
||||
int edit_get_byte (WEdit * edit, long byte_index)
|
||||
@ -419,7 +421,8 @@ edit_load_position (WEdit *edit)
|
||||
g_free (filename);
|
||||
|
||||
edit_move_to_line (edit, line - 1);
|
||||
edit_move_to_column (edit, column);
|
||||
edit->prev_col = column;
|
||||
edit_move_to_prev_col (edit, edit_bol (edit, edit->curs1));
|
||||
edit_move_display (edit, line - (edit->num_widget_lines / 2));
|
||||
}
|
||||
|
||||
@ -1566,19 +1569,6 @@ void edit_move_to_line (WEdit * e, long line)
|
||||
edit_scroll_screen_over_cursor (e);
|
||||
}
|
||||
|
||||
/* move cursor to column 'column' */
|
||||
void
|
||||
edit_move_to_column (WEdit *e, long column)
|
||||
{
|
||||
long p; /* new cursor position */
|
||||
|
||||
p = min (edit_bol (e, e->curs1) + column, edit_eol (e, e->curs1));
|
||||
edit_cursor_move (e, p - e->curs1);
|
||||
e->search_start = e->curs1;
|
||||
e->prev_col = edit_get_col (e);
|
||||
edit_scroll_screen_over_cursor (e);
|
||||
}
|
||||
|
||||
/* scroll window so that first visible line is 'line' */
|
||||
void edit_move_display (WEdit * e, long line)
|
||||
{
|
||||
|
@ -216,7 +216,6 @@ int edit_printf (WEdit * e, const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 2, 3)));
|
||||
int edit_print_string (WEdit * e, const char *s);
|
||||
void edit_move_to_line (WEdit * e, long line);
|
||||
void edit_move_to_column (WEdit * e, long column);
|
||||
void edit_move_display (WEdit * e, long line);
|
||||
void edit_word_wrap (WEdit * edit);
|
||||
unsigned char *edit_get_block (WEdit * edit, long start, long finish, int *l);
|
||||
|
Loading…
Reference in New Issue
Block a user