(edit_mark_cmd): take gboolean instead of int.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Этот коммит содержится в:
родитель
30e185bb69
Коммит
32d32996fd
@ -232,7 +232,7 @@ gboolean edit_load_cmd (Dlg_head * h);
|
||||
gboolean edit_load_syntax_file (Dlg_head * h);
|
||||
gboolean edit_load_menu_file (Dlg_head * h);
|
||||
gboolean edit_close_cmd (WEdit * edit);
|
||||
void edit_mark_cmd (WEdit * edit, int unmark);
|
||||
void edit_mark_cmd (WEdit * edit, gboolean unmark);
|
||||
void edit_mark_current_word_cmd (WEdit * edit);
|
||||
void edit_mark_current_line_cmd (WEdit * edit);
|
||||
void edit_set_markers (WEdit * edit, long m1, long m2, int c1, int c2);
|
||||
|
@ -3301,7 +3301,7 @@ edit_set_markers (WEdit * edit, long m1, long m2, int c1, int c2)
|
||||
/** highlight marker toggle */
|
||||
|
||||
void
|
||||
edit_mark_cmd (WEdit * edit, int unmark)
|
||||
edit_mark_cmd (WEdit * edit, gboolean unmark)
|
||||
{
|
||||
edit_push_markers (edit);
|
||||
if (unmark)
|
||||
@ -3576,8 +3576,8 @@ edit_execute_cmd (WEdit * edit, unsigned long command, int char_for_insertion)
|
||||
edit->column_highlight = 0;
|
||||
if (edit->highlight == 0 || (edit->mark2 != -1 && edit->mark1 != edit->mark2))
|
||||
{
|
||||
edit_mark_cmd (edit, 1); /* clear */
|
||||
edit_mark_cmd (edit, 0); /* marking on */
|
||||
edit_mark_cmd (edit, TRUE); /* clear */
|
||||
edit_mark_cmd (edit, FALSE); /* marking on */
|
||||
}
|
||||
edit->highlight = 1;
|
||||
break;
|
||||
@ -3585,7 +3585,7 @@ edit_execute_cmd (WEdit * edit, unsigned long command, int char_for_insertion)
|
||||
/* any other command */
|
||||
default:
|
||||
if (edit->highlight)
|
||||
edit_mark_cmd (edit, 0); /* clear */
|
||||
edit_mark_cmd (edit, FALSE); /* clear */
|
||||
edit->highlight = 0;
|
||||
}
|
||||
|
||||
@ -3695,7 +3695,7 @@ edit_execute_cmd (WEdit * edit, unsigned long command, int char_for_insertion)
|
||||
if (edit->column_highlight)
|
||||
edit_push_undo_action (edit, COLUMN_ON);
|
||||
edit->column_highlight = 0;
|
||||
edit_mark_cmd (edit, 1);
|
||||
edit_mark_cmd (edit, TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3943,7 +3943,7 @@ edit_execute_cmd (WEdit * edit, unsigned long command, int char_for_insertion)
|
||||
if (edit->mark1 != edit->mark2 && !option_persistent_selections)
|
||||
{
|
||||
if (edit->mark2 < 0)
|
||||
edit_mark_cmd (edit, 0);
|
||||
edit_mark_cmd (edit, FALSE);
|
||||
edit_move_block_to_right (edit);
|
||||
}
|
||||
else
|
||||
@ -3974,13 +3974,13 @@ edit_execute_cmd (WEdit * edit, unsigned long command, int char_for_insertion)
|
||||
edit_push_undo_action (edit, COLUMN_ON);
|
||||
edit->column_highlight = 0;
|
||||
}
|
||||
edit_mark_cmd (edit, 0);
|
||||
edit_mark_cmd (edit, FALSE);
|
||||
break;
|
||||
case CK_MarkColumn:
|
||||
if (!edit->column_highlight)
|
||||
edit_push_undo_action (edit, COLUMN_OFF);
|
||||
edit->column_highlight = 1;
|
||||
edit_mark_cmd (edit, 0);
|
||||
edit_mark_cmd (edit, FALSE);
|
||||
break;
|
||||
case CK_MarkAll:
|
||||
edit_set_markers (edit, 0, edit->last_byte, 0, 0);
|
||||
@ -3990,7 +3990,7 @@ edit_execute_cmd (WEdit * edit, unsigned long command, int char_for_insertion)
|
||||
if (edit->column_highlight)
|
||||
edit_push_undo_action (edit, COLUMN_ON);
|
||||
edit->column_highlight = 0;
|
||||
edit_mark_cmd (edit, 1);
|
||||
edit_mark_cmd (edit, TRUE);
|
||||
break;
|
||||
case CK_MarkWord:
|
||||
if (edit->column_highlight)
|
||||
|
@ -561,7 +561,7 @@ edit_block_delete (WEdit * edit)
|
||||
if (eval_marks (edit, &start_mark, &end_mark))
|
||||
return 0;
|
||||
if (edit->column_highlight && edit->mark2 < 0)
|
||||
edit_mark_cmd (edit, 0);
|
||||
edit_mark_cmd (edit, FALSE);
|
||||
if ((end_mark - start_mark) > option_max_undo / 2)
|
||||
{
|
||||
/* Warning message with a query to continue or cancel the operation */
|
||||
@ -596,7 +596,7 @@ edit_block_delete (WEdit * edit)
|
||||
int line_width;
|
||||
|
||||
if (edit->mark2 < 0)
|
||||
edit_mark_cmd (edit, 0);
|
||||
edit_mark_cmd (edit, FALSE);
|
||||
edit_delete_column_of_text (edit);
|
||||
/* move cursor to the saved position */
|
||||
edit_move_to_line (edit, curs_line);
|
||||
@ -2440,7 +2440,7 @@ edit_block_move_cmd (WEdit * edit)
|
||||
|
||||
line = edit->curs_line;
|
||||
if (edit->mark2 < 0)
|
||||
edit_mark_cmd (edit, 0);
|
||||
edit_mark_cmd (edit, FALSE);
|
||||
edit_push_markers (edit);
|
||||
|
||||
if (edit->column_highlight)
|
||||
@ -3007,7 +3007,7 @@ edit_cut_to_X_buf_cmd (WEdit * edit)
|
||||
mc_event_raise (MCEVENT_GROUP_CORE, "clipboard_file_to_ext_clip", NULL);
|
||||
|
||||
edit_block_delete_cmd (edit);
|
||||
edit_mark_cmd (edit, 1);
|
||||
edit_mark_cmd (edit, TRUE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -578,13 +578,13 @@ edit_event (Gpm_Event * event, void *data)
|
||||
|
||||
if ((local.type & GPM_DOWN) != 0)
|
||||
{
|
||||
edit_mark_cmd (edit, 1); /* reset */
|
||||
edit_mark_cmd (edit, TRUE); /* reset */
|
||||
edit->highlight = 0;
|
||||
}
|
||||
|
||||
done = (local.type & GPM_DRAG) == 0;
|
||||
if (done)
|
||||
edit_mark_cmd (edit, 0);
|
||||
edit_mark_cmd (edit, FALSE);
|
||||
|
||||
update:
|
||||
edit_find_bracket (edit);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user