replace "Persistent blocks" to "Persistent selection" in

edit/edit.c, edit/edit.h, edit/editoptions.c, src/setup.c
This commit is contained in:
Ilia Maslakov 2009-03-28 00:35:25 +00:00
commit a443945748
4 changed files with 12 additions and 13 deletions

View File

@ -63,7 +63,7 @@ int option_fake_half_tabs = 1;
int option_save_mode = EDIT_QUICK_SAVE;
int option_save_position = 1;
int option_max_undo = 32768;
int option_persistent_block = 0;
int option_persistent_selections = 0;
int option_edit_right_extreme = 0;
int option_edit_left_extreme = 0;
@ -2224,14 +2224,13 @@ edit_execute_cmd (WEdit *edit, int command, int char_for_insertion)
case CK_Down:
case CK_Left:
case CK_Right:
if ( !option_persistent_block ) {
if ( !option_persistent_selections ) {
if (column_highlighting)
edit_push_action (edit, COLUMN_ON);
column_highlighting = 0;
edit_mark_cmd (edit, 1);
}
}
switch (command) {
case CK_Begin_Page:
case CK_End_Page:
@ -2257,8 +2256,8 @@ edit_execute_cmd (WEdit *edit, int command, int char_for_insertion)
/* basic cursor key commands */
switch (command) {
case CK_BackSpace:
/* if non persistent block and text selected */
if ( !option_persistent_block ) {
/* if non persistent selection and text selected */
if ( !option_persistent_selections ) {
if ( edit->mark1 != edit->mark2 ) {
edit_block_delete_cmd (edit);
break;
@ -2282,8 +2281,8 @@ edit_execute_cmd (WEdit *edit, int command, int char_for_insertion)
edit_backspace (edit);
break;
case CK_Delete:
/* if non persistent block and text selected */
if ( !option_persistent_block ) {
/* if non persistent selection and text selected */
if ( !option_persistent_selections ) {
if ( edit->mark1 != edit->mark2 ) {
edit_block_delete_cmd (edit);
break;

View File

@ -282,7 +282,7 @@ extern int option_fill_tabs_with_spaces;
extern int option_return_does_auto_indent;
extern int option_backspace_through_tabs;
extern int option_fake_half_tabs;
extern int option_persistent_block;
extern int option_persistent_selections;
typedef enum {
EDIT_QUICK_SAVE = 0,

View File

@ -76,7 +76,7 @@ edit_options_dialog (void)
int toption_save_position = option_save_position;
int tedit_confirm_save = edit_confirm_save;
int tedit_syntax_highlighting = option_syntax_highlighting;
int tedit_persistent_block = option_persistent_block;
int tedit_persistent_selections = option_persistent_selections;
int toption_return_does_auto_indent = option_return_does_auto_indent;
int toption_backspace_through_tabs = option_backspace_through_tabs;
int toption_fake_half_tabs = option_fake_half_tabs;
@ -104,7 +104,7 @@ edit_options_dialog (void)
"edit-tab-spacing"},
/* 6 */
{quick_checkbox, OPT_DLG_W / 2 + 1, OPT_DLG_W, OPT_DLG_H - 9,
OPT_DLG_H, N_("Persistent block"), 8, 0, 0, 0, NULL},
OPT_DLG_H, N_("Pers&istent selection"), 8, 0, 0, 0, NULL},
/* 7 */
{quick_checkbox, OPT_DLG_W / 2 + 1, OPT_DLG_W, OPT_DLG_H - 10,
OPT_DLG_H, N_("Synta&x highlighting"), 8, 0, 0, 0, NULL},
@ -160,7 +160,7 @@ edit_options_dialog (void)
quick_widgets[3].str_result = &p;
quick_widgets[5].text = tab_spacing;
quick_widgets[5].str_result = &q;
quick_widgets[6].result = &tedit_persistent_block;
quick_widgets[6].result = &tedit_persistent_selections;
quick_widgets[7].result = &tedit_syntax_highlighting;
quick_widgets[8].result = &toption_save_position;
quick_widgets[9].result = &tedit_confirm_save;
@ -200,7 +200,7 @@ edit_options_dialog (void)
g_free (q);
}
option_persistent_block = tedit_persistent_block;
option_persistent_selections = tedit_persistent_selections;
option_syntax_highlighting = tedit_syntax_highlighting;
edit_confirm_save = tedit_confirm_save;
option_save_position = toption_save_position;

View File

@ -216,7 +216,7 @@ static const struct {
{ "editor_option_typewriter_wrap", &option_typewriter_wrap },
{ "editor_edit_confirm_save", &edit_confirm_save },
{ "editor_syntax_highlighting", &option_syntax_highlighting },
{ "editor_persistent_block", &option_persistent_block },
{ "editor_persistent_selections", &option_persistent_selections },
{ "editor_visible_tabs", &visible_tabs },
{ "editor_visible_spaces", &visible_tws },
#endif /* USE_INTERNAL_EDIT */