From 02c6b02b67d20cf18cdb717e3ac9f4b3a41521f7 Mon Sep 17 00:00:00 2001 From: Ilia Maslakov Date: Tue, 16 Mar 2010 18:59:39 +0300 Subject: [PATCH] liitle fixup Signed-off-by: Ilia Maslakov --- src/editor/edit.c | 10 ++-------- src/editor/editdraw.c | 3 ++- src/keybind.c | 1 + 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/editor/edit.c b/src/editor/edit.c index 56c157980..fb710285f 100644 --- a/src/editor/edit.c +++ b/src/editor/edit.c @@ -2955,8 +2955,8 @@ edit_execute_cmd (WEdit *edit, unsigned long command, int char_for_insertion) edit->force |= REDRAW_PAGE; break; - case CK_Add_Collapse_Region: - if (option_line_status) + case CK_New_Collapse_Region: + if (option_line_state) { if (edit->mark1 != edit->mark2) { @@ -2965,13 +2965,9 @@ edit_execute_cmd (WEdit *edit, unsigned long command, int char_for_insertion) int lines_selected = edit_count_lines (edit, start_mark, edit->curs1); int start_line = edit->curs_line; if (edit->curs1 > edit->mark1) - { start_line = edit->curs_line - upto_start; - } else - { start_line = edit->curs_line + upto_start; - } unsigned int end_line; edit->highlight = 0; edit->mark1 = 0; @@ -2981,9 +2977,7 @@ edit_execute_cmd (WEdit *edit, unsigned long command, int char_for_insertion) edit->collapsed = book_mark_collapse_insert (edit->collapsed, start_line, end_line, 1); } else - { book_mark_collapse (edit->collapsed, edit->curs_line); - } edit->force |= REDRAW_PAGE; } break; diff --git a/src/editor/editdraw.c b/src/editor/editdraw.c index c6bda2087..06ec11808 100644 --- a/src/editor/editdraw.c +++ b/src/editor/editdraw.c @@ -670,7 +670,8 @@ render_edit_text (WEdit * edit, long start_row, long start_column, long end_row, if (!(force & REDRAW_IN_BOUNDS)) { /* !REDRAW_IN_BOUNDS means to ignore bounds and redraw whole rows */ start_row = 0; end_row = edit->num_widget_lines - 1; - if ( option_line_status ) { + if (option_line_state) + { skip_rows = book_mark_get_shiftup (edit->collapsed, edit->curs_line + 1); end_row += skip_rows; } diff --git a/src/keybind.c b/src/keybind.c index 4e24448cb..71c019aa9 100644 --- a/src/keybind.c +++ b/src/keybind.c @@ -92,6 +92,7 @@ static name_keymap_t command_names[] = { { "EditReplace", CK_Replace }, { "EditReplaceAgain", CK_Replace_Again }, { "EditCompleteWord", CK_Complete_Word }, + { "EditNewCollapsedRegion", CK_New_Collapse_Region }, #if 0 { "EditDebugStart", CK_Debug_Start }, -- 2.11.4.GIT