mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 04:22:34 +03:00
added configure option editor_autodetect_linebreak
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
This commit is contained in:
parent
d1c1d6e2fb
commit
f72dcb4e30
@ -90,6 +90,7 @@ int option_persistent_selections = 1;
|
|||||||
int option_cursor_beyond_eol = 0;
|
int option_cursor_beyond_eol = 0;
|
||||||
int option_line_state = 0;
|
int option_line_state = 0;
|
||||||
int option_line_state_width = 0;
|
int option_line_state_width = 0;
|
||||||
|
int option_autodetect_lb = 0;
|
||||||
|
|
||||||
int option_edit_right_extreme = 0;
|
int option_edit_right_extreme = 0;
|
||||||
int option_edit_left_extreme = 0;
|
int option_edit_left_extreme = 0;
|
||||||
@ -489,7 +490,8 @@ edit_load_file (WEdit * edit)
|
|||||||
edit_clean (edit);
|
edit_clean (edit);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
lb_type = detect_lb_type (edit->filename_vpath);
|
if (option_autodetect_lb)
|
||||||
|
lb_type = detect_lb_type (edit->filename_vpath);
|
||||||
|
|
||||||
if (lb_type != LB_ASIS && lb_type != LB_UNIX)
|
if (lb_type != LB_ASIS && lb_type != LB_UNIX)
|
||||||
fast_load = FALSE;
|
fast_load = FALSE;
|
||||||
|
@ -37,6 +37,7 @@ extern int option_auto_para_formatting;
|
|||||||
extern int option_fill_tabs_with_spaces;
|
extern int option_fill_tabs_with_spaces;
|
||||||
extern int option_return_does_auto_indent;
|
extern int option_return_does_auto_indent;
|
||||||
extern int option_backspace_through_tabs;
|
extern int option_backspace_through_tabs;
|
||||||
|
extern int option_autodetect_lb;
|
||||||
extern int option_fake_half_tabs;
|
extern int option_fake_half_tabs;
|
||||||
extern int option_persistent_selections;
|
extern int option_persistent_selections;
|
||||||
extern int option_cursor_beyond_eol;
|
extern int option_cursor_beyond_eol;
|
||||||
|
@ -149,17 +149,19 @@ edit_options_dialog (Dlg_head * h)
|
|||||||
N_("Confir&m before saving"), &edit_confirm_save),
|
N_("Confir&m before saving"), &edit_confirm_save),
|
||||||
/* 12 */ QUICK_CHECKBOX (OPT_DLG_W / 2 + 1, OPT_DLG_W, 3, OPT_DLG_H,
|
/* 12 */ QUICK_CHECKBOX (OPT_DLG_W / 2 + 1, OPT_DLG_W, 3, OPT_DLG_H,
|
||||||
N_("&Return does autoindent"), &option_return_does_auto_indent),
|
N_("&Return does autoindent"), &option_return_does_auto_indent),
|
||||||
/* 13 */ QUICK_LABEL (3, OPT_DLG_W, 11, OPT_DLG_H, N_("Tab spacing:")),
|
/* 13 */ QUICK_LABEL (3, OPT_DLG_W, 12, OPT_DLG_H, N_("Tab spacing:")),
|
||||||
/* 14 */ QUICK_INPUT (3 + 24, OPT_DLG_W, 11, OPT_DLG_H,
|
/* 14 */ QUICK_INPUT (3 + 24, OPT_DLG_W, 12, OPT_DLG_H,
|
||||||
tab_spacing, OPT_DLG_W / 2 - 4 - 24, 0, "edit-tab-spacing", &q),
|
tab_spacing, OPT_DLG_W / 2 - 4 - 24, 0, "edit-tab-spacing", &q),
|
||||||
/* 15 */ QUICK_CHECKBOX (3, OPT_DLG_W, 10, OPT_DLG_H,
|
/* 15 */ QUICK_CHECKBOX (3, OPT_DLG_W, 11, OPT_DLG_H,
|
||||||
N_("Fill tabs with &spaces"), &option_fill_tabs_with_spaces),
|
N_("Fill tabs with &spaces"), &option_fill_tabs_with_spaces),
|
||||||
/* 16 */ QUICK_CHECKBOX (3, OPT_DLG_W, 9, OPT_DLG_H,
|
/* 16 */ QUICK_CHECKBOX (3, OPT_DLG_W, 10, OPT_DLG_H,
|
||||||
N_("&Backspace through tabs"), &option_backspace_through_tabs),
|
N_("&Backspace through tabs"), &option_backspace_through_tabs),
|
||||||
/* 17 */ QUICK_CHECKBOX (3, OPT_DLG_W, 8, OPT_DLG_H,
|
/* 17 */ QUICK_CHECKBOX (3, OPT_DLG_W, 9, OPT_DLG_H,
|
||||||
N_("&Fake half tabs"), &option_fake_half_tabs),
|
N_("&Fake half tabs"), &option_fake_half_tabs),
|
||||||
/* 18 */ QUICK_RADIO (4, OPT_DLG_W, 4, OPT_DLG_H, 3, wrap_str, &wrap_mode),
|
/* 18 */ QUICK_CHECKBOX (3, OPT_DLG_W, 8, OPT_DLG_H,
|
||||||
/* 19 */ QUICK_LABEL (3, OPT_DLG_W, 3, OPT_DLG_H, N_("Wrap mode")),
|
N_("&Autodetect line break"), &option_autodetect_lb),
|
||||||
|
/* 19 */ QUICK_RADIO (4, OPT_DLG_W, 4, OPT_DLG_H, 3, wrap_str, &wrap_mode),
|
||||||
|
/* 20 */ QUICK_LABEL (3, OPT_DLG_W, 3, OPT_DLG_H, N_("Wrap mode")),
|
||||||
QUICK_END
|
QUICK_END
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -301,6 +301,7 @@ static const struct
|
|||||||
{ "editor_word_wrap_line_length", &option_word_wrap_line_length },
|
{ "editor_word_wrap_line_length", &option_word_wrap_line_length },
|
||||||
{ "editor_fill_tabs_with_spaces", &option_fill_tabs_with_spaces },
|
{ "editor_fill_tabs_with_spaces", &option_fill_tabs_with_spaces },
|
||||||
{ "editor_return_does_auto_indent", &option_return_does_auto_indent },
|
{ "editor_return_does_auto_indent", &option_return_does_auto_indent },
|
||||||
|
{ "editor_autodetect_linebreak", &option_autodetect_lb },
|
||||||
{ "editor_backspace_through_tabs", &option_backspace_through_tabs },
|
{ "editor_backspace_through_tabs", &option_backspace_through_tabs },
|
||||||
{ "editor_fake_half_tabs", &option_fake_half_tabs },
|
{ "editor_fake_half_tabs", &option_fake_half_tabs },
|
||||||
{ "editor_option_save_mode", &option_save_mode },
|
{ "editor_option_save_mode", &option_save_mode },
|
||||||
|
Loading…
Reference in New Issue
Block a user