* edit.c (edit_move_to_column): Remove, use

edit_move_to_prev_col() instead.
This commit is contained in:
Pavel Roskin 2002-12-08 08:18:57 +00:00
parent c935eaa6c2
commit 78155218a6
3 changed files with 7 additions and 15 deletions

View File

@ -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.

View File

@ -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)
{

View File

@ -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);