mirror of https://github.com/MidnightCommander/mc
Many editor functions: take editor as constant object.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
7f7a75f988
commit
962259a224
|
@ -182,12 +182,12 @@ void user_menu (WEdit * edit, const char *menu_file, int selected_entry);
|
||||||
void edit_init_menu (struct WMenuBar *menubar);
|
void edit_init_menu (struct WMenuBar *menubar);
|
||||||
void edit_save_mode_cmd (void);
|
void edit_save_mode_cmd (void);
|
||||||
gboolean edit_translate_key (WEdit * edit, long x_key, int *cmd, int *ch);
|
gboolean edit_translate_key (WEdit * edit, long x_key, int *cmd, int *ch);
|
||||||
int edit_get_byte (WEdit * edit, off_t byte_index);
|
int edit_get_byte (const WEdit * edit, off_t byte_index);
|
||||||
int edit_get_utf (WEdit * edit, off_t byte_index, int *char_width);
|
int edit_get_utf (const WEdit * edit, off_t byte_index, int *char_width);
|
||||||
long edit_count_lines (WEdit * edit, off_t current, off_t upto);
|
long edit_count_lines (const WEdit * edit, off_t current, off_t upto);
|
||||||
off_t edit_move_forward (WEdit * edit, off_t current, long lines, off_t upto);
|
off_t edit_move_forward (const WEdit * edit, off_t current, long lines, off_t upto);
|
||||||
off_t edit_move_forward3 (WEdit * edit, off_t current, long cols, off_t upto);
|
off_t edit_move_forward3 (const WEdit * edit, off_t current, long cols, off_t upto);
|
||||||
off_t edit_move_backward (WEdit * edit, off_t current, long lines);
|
off_t edit_move_backward (const WEdit * edit, off_t current, long lines);
|
||||||
void edit_scroll_screen_over_cursor (WEdit * edit);
|
void edit_scroll_screen_over_cursor (WEdit * edit);
|
||||||
void edit_render_keypress (WEdit * edit);
|
void edit_render_keypress (WEdit * edit);
|
||||||
void edit_scroll_upward (WEdit * edit, long i);
|
void edit_scroll_upward (WEdit * edit, long i);
|
||||||
|
@ -197,9 +197,9 @@ void edit_scroll_left (WEdit * edit, long i);
|
||||||
void edit_move_up (WEdit * edit, long i, gboolean do_scroll);
|
void edit_move_up (WEdit * edit, long i, gboolean do_scroll);
|
||||||
void edit_move_down (WEdit * edit, long i, gboolean do_scroll);
|
void edit_move_down (WEdit * edit, long i, gboolean do_scroll);
|
||||||
void edit_move_to_prev_col (WEdit * edit, off_t p);
|
void edit_move_to_prev_col (WEdit * edit, off_t p);
|
||||||
long edit_get_col (WEdit * edit);
|
long edit_get_col (const WEdit * edit);
|
||||||
off_t edit_bol (WEdit * edit, off_t current);
|
off_t edit_bol (const WEdit * edit, off_t current);
|
||||||
off_t edit_eol (WEdit * edit, off_t current);
|
off_t edit_eol (const WEdit * edit, off_t current);
|
||||||
void edit_update_curs_row (WEdit * edit);
|
void edit_update_curs_row (WEdit * edit);
|
||||||
void edit_update_curs_col (WEdit * edit);
|
void edit_update_curs_col (WEdit * edit);
|
||||||
void edit_find_bracket (WEdit * edit);
|
void edit_find_bracket (WEdit * edit);
|
||||||
|
@ -258,7 +258,7 @@ off_t edit_insert_column_of_text_from_file (WEdit * edit, int file,
|
||||||
off_t * start_pos, off_t * end_pos, long *col1,
|
off_t * start_pos, off_t * end_pos, long *col1,
|
||||||
long *col2);
|
long *col2);
|
||||||
|
|
||||||
char *edit_get_word_from_pos (WEdit * edit, off_t start_pos, off_t * start, gsize * len,
|
char *edit_get_word_from_pos (const WEdit * edit, off_t start_pos, off_t * start, gsize * len,
|
||||||
gsize * cut);
|
gsize * cut);
|
||||||
long edit_insert_file (WEdit * edit, const vfs_path_t * filename_vpath);
|
long edit_insert_file (WEdit * edit, const vfs_path_t * filename_vpath);
|
||||||
gboolean edit_load_back_cmd (WEdit * edit);
|
gboolean edit_load_back_cmd (WEdit * edit);
|
||||||
|
@ -317,9 +317,9 @@ void book_mark_dec (WEdit * edit, long line);
|
||||||
void book_mark_serialize (WEdit * edit, int color);
|
void book_mark_serialize (WEdit * edit, int color);
|
||||||
void book_mark_restore (WEdit * edit, int color);
|
void book_mark_restore (WEdit * edit, int color);
|
||||||
|
|
||||||
gboolean line_is_blank (WEdit * edit, long line);
|
gboolean edit_line_is_blank (WEdit * edit, long line);
|
||||||
gboolean is_break_char (char c);
|
gboolean is_break_char (char c);
|
||||||
long edit_indent_width (WEdit * edit, off_t p);
|
long edit_indent_width (const WEdit * edit, off_t p);
|
||||||
void edit_insert_indent (WEdit * edit, int indent);
|
void edit_insert_indent (WEdit * edit, int indent);
|
||||||
void edit_options_dialog (Dlg_head * h);
|
void edit_options_dialog (Dlg_head * h);
|
||||||
void edit_syntax_dialog (WEdit * edit);
|
void edit_syntax_dialog (WEdit * edit);
|
||||||
|
|
|
@ -654,7 +654,7 @@ edit_modification (WEdit * edit)
|
||||||
|
|
||||||
#ifdef HAVE_CHARSET
|
#ifdef HAVE_CHARSET
|
||||||
static char *
|
static char *
|
||||||
edit_get_byte_ptr (WEdit * edit, off_t byte_index)
|
edit_get_byte_ptr (const WEdit * edit, off_t byte_index)
|
||||||
{
|
{
|
||||||
if (byte_index >= (edit->curs1 + edit->curs2) || byte_index < 0)
|
if (byte_index >= (edit->curs1 + edit->curs2) || byte_index < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -677,7 +677,7 @@ edit_get_byte_ptr (WEdit * edit, off_t byte_index)
|
||||||
|
|
||||||
#ifdef HAVE_CHARSET
|
#ifdef HAVE_CHARSET
|
||||||
static int
|
static int
|
||||||
edit_get_prev_utf (WEdit * edit, off_t byte_index, int *char_width)
|
edit_get_prev_utf (const WEdit * edit, off_t byte_index, int *char_width)
|
||||||
{
|
{
|
||||||
int i, res;
|
int i, res;
|
||||||
gchar utf8_buf[3 * UTF8_CHAR_LEN + 1];
|
gchar utf8_buf[3 * UTF8_CHAR_LEN + 1];
|
||||||
|
@ -731,7 +731,7 @@ edit_get_prev_utf (WEdit * edit, off_t byte_index, int *char_width)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
is_in_indent (WEdit * edit)
|
is_in_indent (const WEdit * edit)
|
||||||
{
|
{
|
||||||
off_t p;
|
off_t p;
|
||||||
|
|
||||||
|
@ -752,7 +752,7 @@ is_in_indent (WEdit * edit)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
is_blank (WEdit * edit, off_t offset)
|
is_blank (const WEdit * edit, off_t offset)
|
||||||
{
|
{
|
||||||
off_t s, f;
|
off_t s, f;
|
||||||
int c;
|
int c;
|
||||||
|
@ -831,16 +831,16 @@ edit_move_up_paragraph (WEdit * edit, gboolean do_scroll)
|
||||||
|
|
||||||
if (edit->curs_line > 1)
|
if (edit->curs_line > 1)
|
||||||
{
|
{
|
||||||
if (!line_is_blank (edit, edit->curs_line))
|
if (!edit_line_is_blank (edit, edit->curs_line))
|
||||||
{
|
{
|
||||||
for (i = edit->curs_line - 1; i != 0; i--)
|
for (i = edit->curs_line - 1; i != 0; i--)
|
||||||
if (line_is_blank (edit, i))
|
if (edit_line_is_blank (edit, i))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (line_is_blank (edit, edit->curs_line - 1))
|
else if (edit_line_is_blank (edit, edit->curs_line - 1))
|
||||||
{
|
{
|
||||||
for (i = edit->curs_line - 1; i != 0; i--)
|
for (i = edit->curs_line - 1; i != 0; i--)
|
||||||
if (!line_is_blank (edit, i))
|
if (!edit_line_is_blank (edit, i))
|
||||||
{
|
{
|
||||||
i++;
|
i++;
|
||||||
break;
|
break;
|
||||||
|
@ -849,7 +849,7 @@ edit_move_up_paragraph (WEdit * edit, gboolean do_scroll)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (i = edit->curs_line - 1; i != 0; i--)
|
for (i = edit->curs_line - 1; i != 0; i--)
|
||||||
if (line_is_blank (edit, i))
|
if (edit_line_is_blank (edit, i))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -868,16 +868,16 @@ edit_move_down_paragraph (WEdit * edit, gboolean do_scroll)
|
||||||
|
|
||||||
if (edit->curs_line >= edit->total_lines - 1)
|
if (edit->curs_line >= edit->total_lines - 1)
|
||||||
i = edit->total_lines;
|
i = edit->total_lines;
|
||||||
else if (!line_is_blank (edit, edit->curs_line))
|
else if (!edit_line_is_blank (edit, edit->curs_line))
|
||||||
{
|
{
|
||||||
for (i = edit->curs_line + 1; i != 0; i++)
|
for (i = edit->curs_line + 1; i != 0; i++)
|
||||||
if (line_is_blank (edit, i) || i >= edit->total_lines)
|
if (edit_line_is_blank (edit, i) || i >= edit->total_lines)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (line_is_blank (edit, edit->curs_line + 1))
|
else if (edit_line_is_blank (edit, edit->curs_line + 1))
|
||||||
{
|
{
|
||||||
for (i = edit->curs_line + 1; i != 0; i++)
|
for (i = edit->curs_line + 1; i != 0; i++)
|
||||||
if (!line_is_blank (edit, i) || i > edit->total_lines)
|
if (!edit_line_is_blank (edit, i) || i > edit->total_lines)
|
||||||
{
|
{
|
||||||
i--;
|
i--;
|
||||||
break;
|
break;
|
||||||
|
@ -886,7 +886,7 @@ edit_move_down_paragraph (WEdit * edit, gboolean do_scroll)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (i = edit->curs_line + 1; i != 0; i++)
|
for (i = edit->curs_line + 1; i != 0; i++)
|
||||||
if (line_is_blank (edit, i) || i >= edit->total_lines)
|
if (edit_line_is_blank (edit, i) || i >= edit->total_lines)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
edit_move_down (edit, i - edit->curs_line, do_scroll);
|
edit_move_down (edit, i - edit->curs_line, do_scroll);
|
||||||
|
@ -1672,7 +1672,7 @@ edit_move_block_to_right (WEdit * edit)
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
edit_cursor_move (edit, cur_bol - edit->curs1);
|
edit_cursor_move (edit, cur_bol - edit->curs1);
|
||||||
if (!line_is_blank (edit, edit->curs_line))
|
if (!edit_line_is_blank (edit, edit->curs_line))
|
||||||
{
|
{
|
||||||
if (option_fill_tabs_with_spaces)
|
if (option_fill_tabs_with_spaces)
|
||||||
insert_spaces_tab (edit, option_fake_half_tabs);
|
insert_spaces_tab (edit, option_fake_half_tabs);
|
||||||
|
@ -1815,7 +1815,7 @@ user_menu (WEdit * edit, const char *menu_file, int selected_entry)
|
||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
int
|
int
|
||||||
edit_get_byte (WEdit * edit, off_t byte_index)
|
edit_get_byte (const WEdit * edit, off_t byte_index)
|
||||||
{
|
{
|
||||||
off_t p;
|
off_t p;
|
||||||
|
|
||||||
|
@ -1835,7 +1835,7 @@ edit_get_byte (WEdit * edit, off_t byte_index)
|
||||||
|
|
||||||
#ifdef HAVE_CHARSET
|
#ifdef HAVE_CHARSET
|
||||||
int
|
int
|
||||||
edit_get_utf (WEdit * edit, off_t byte_index, int *char_width)
|
edit_get_utf (const WEdit * edit, off_t byte_index, int *char_width)
|
||||||
{
|
{
|
||||||
gchar *str = NULL;
|
gchar *str = NULL;
|
||||||
int res = -1;
|
int res = -1;
|
||||||
|
@ -2028,7 +2028,7 @@ is_break_char (char c)
|
||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
char *
|
char *
|
||||||
edit_get_word_from_pos (WEdit * edit, off_t start_pos, off_t * start, gsize * len, gsize * cut)
|
edit_get_word_from_pos (const WEdit * edit, off_t start_pos, off_t * start, gsize * len, gsize * cut)
|
||||||
{
|
{
|
||||||
off_t word_start;
|
off_t word_start;
|
||||||
long cut_len = 0;
|
long cut_len = 0;
|
||||||
|
@ -2936,7 +2936,7 @@ edit_cursor_move (WEdit * edit, off_t increment)
|
||||||
/** returns index of last char on line + 1 */
|
/** returns index of last char on line + 1 */
|
||||||
|
|
||||||
off_t
|
off_t
|
||||||
edit_eol (WEdit * edit, off_t current)
|
edit_eol (const WEdit * edit, off_t current)
|
||||||
{
|
{
|
||||||
if (current >= edit->last_byte)
|
if (current >= edit->last_byte)
|
||||||
return edit->last_byte;
|
return edit->last_byte;
|
||||||
|
@ -2951,7 +2951,7 @@ edit_eol (WEdit * edit, off_t current)
|
||||||
/** returns index of first char on line */
|
/** returns index of first char on line */
|
||||||
|
|
||||||
off_t
|
off_t
|
||||||
edit_bol (WEdit * edit, off_t current)
|
edit_bol (const WEdit * edit, off_t current)
|
||||||
{
|
{
|
||||||
if (current <= 0)
|
if (current <= 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -2965,9 +2965,10 @@ edit_bol (WEdit * edit, off_t current)
|
||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
long
|
long
|
||||||
edit_count_lines (WEdit * edit, off_t current, off_t upto)
|
edit_count_lines (const WEdit * edit, off_t current, off_t upto)
|
||||||
{
|
{
|
||||||
long lines = 0;
|
long lines = 0;
|
||||||
|
|
||||||
if (upto > edit->last_byte)
|
if (upto > edit->last_byte)
|
||||||
upto = edit->last_byte;
|
upto = edit->last_byte;
|
||||||
if (current < 0)
|
if (current < 0)
|
||||||
|
@ -2983,7 +2984,7 @@ edit_count_lines (WEdit * edit, off_t current, off_t upto)
|
||||||
/* If upto is zero returns index of lines forward current. */
|
/* If upto is zero returns index of lines forward current. */
|
||||||
|
|
||||||
off_t
|
off_t
|
||||||
edit_move_forward (WEdit * edit, off_t current, long lines, off_t upto)
|
edit_move_forward (const WEdit * edit, off_t current, long lines, off_t upto)
|
||||||
{
|
{
|
||||||
if (upto != 0)
|
if (upto != 0)
|
||||||
{
|
{
|
||||||
|
@ -3010,7 +3011,7 @@ edit_move_forward (WEdit * edit, off_t current, long lines, off_t upto)
|
||||||
/** Returns offset of 'lines' lines up from current */
|
/** Returns offset of 'lines' lines up from current */
|
||||||
|
|
||||||
off_t
|
off_t
|
||||||
edit_move_backward (WEdit * edit, off_t current, long lines)
|
edit_move_backward (const WEdit * edit, off_t current, long lines)
|
||||||
{
|
{
|
||||||
if (lines < 0)
|
if (lines < 0)
|
||||||
lines = 0;
|
lines = 0;
|
||||||
|
@ -3025,7 +3026,7 @@ edit_move_backward (WEdit * edit, off_t current, long lines)
|
||||||
/* If upto is zero returns index of cols across from current. */
|
/* If upto is zero returns index of cols across from current. */
|
||||||
|
|
||||||
off_t
|
off_t
|
||||||
edit_move_forward3 (WEdit * edit, off_t current, long cols, off_t upto)
|
edit_move_forward3 (const WEdit * edit, off_t current, long cols, off_t upto)
|
||||||
{
|
{
|
||||||
off_t p, q;
|
off_t p, q;
|
||||||
long col;
|
long col;
|
||||||
|
@ -3095,7 +3096,7 @@ edit_move_forward3 (WEdit * edit, off_t current, long cols, off_t upto)
|
||||||
/** returns the current column position of the cursor */
|
/** returns the current column position of the cursor */
|
||||||
|
|
||||||
long
|
long
|
||||||
edit_get_col (WEdit * edit)
|
edit_get_col (const WEdit * edit)
|
||||||
{
|
{
|
||||||
return (long) edit_move_forward3 (edit, edit_bol (edit, edit->curs1), 0, edit->curs1);
|
return (long) edit_move_forward3 (edit, edit_bol (edit, edit->curs1), 0, edit->curs1);
|
||||||
}
|
}
|
||||||
|
@ -3226,7 +3227,7 @@ edit_move_to_prev_col (WEdit * edit, off_t p)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
edit->over_col = 0;
|
edit->over_col = 0;
|
||||||
if (is_in_indent (edit) && option_fake_half_tabs)
|
if (option_fake_half_tabs && is_in_indent (edit))
|
||||||
{
|
{
|
||||||
edit_update_curs_col (edit);
|
edit_update_curs_col (edit);
|
||||||
if (space_width != 0 && edit->curs_col % (HALF_TAB_SIZE * space_width) != 0)
|
if (space_width != 0 && edit->curs_col % (HALF_TAB_SIZE * space_width) != 0)
|
||||||
|
@ -3255,7 +3256,7 @@ edit_move_to_prev_col (WEdit * edit, off_t p)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
line_is_blank (WEdit * edit, long line)
|
edit_line_is_blank (WEdit * edit, long line)
|
||||||
{
|
{
|
||||||
return is_blank (edit, edit_find_line (edit, line));
|
return is_blank (edit, edit_find_line (edit, line));
|
||||||
}
|
}
|
||||||
|
@ -3416,7 +3417,7 @@ edit_delete_line (WEdit * edit)
|
||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
long
|
long
|
||||||
edit_indent_width (WEdit * edit, off_t p)
|
edit_indent_width (const WEdit * edit, off_t p)
|
||||||
{
|
{
|
||||||
off_t q = p;
|
off_t q = p;
|
||||||
|
|
||||||
|
|
|
@ -167,7 +167,7 @@ destroy_defines (GTree ** defines)
|
||||||
|
|
||||||
/** Wrapper for case insensitive mode */
|
/** Wrapper for case insensitive mode */
|
||||||
inline static int
|
inline static int
|
||||||
xx_tolower (WEdit * edit, int c)
|
xx_tolower (const WEdit * edit, int c)
|
||||||
{
|
{
|
||||||
return edit->is_case_insensitive ? tolower (c) : c;
|
return edit->is_case_insensitive ? tolower (c) : c;
|
||||||
}
|
}
|
||||||
|
@ -216,7 +216,7 @@ subst_defines (GTree * defines, char **argv, char **argv_end)
|
||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
static long
|
static long
|
||||||
compare_word_to_right (WEdit * edit, long i, const char *text,
|
compare_word_to_right (const WEdit * edit, long i, const char *text,
|
||||||
const char *whole_left, const char *whole_right, int line_start)
|
const char *whole_left, const char *whole_right, int line_start)
|
||||||
{
|
{
|
||||||
const unsigned char *p, *q;
|
const unsigned char *p, *q;
|
||||||
|
@ -341,7 +341,7 @@ compare_word_to_right (WEdit * edit, long i, const char *text,
|
||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
xx_strchr (WEdit * edit, const unsigned char *s, int char_byte)
|
xx_strchr (const WEdit * edit, const unsigned char *s, int char_byte)
|
||||||
{
|
{
|
||||||
while (*s >= '\005' && xx_tolower (edit, *s) != char_byte)
|
while (*s >= '\005' && xx_tolower (edit, *s) != char_byte)
|
||||||
s++;
|
s++;
|
||||||
|
@ -604,7 +604,7 @@ edit_get_rule (WEdit * edit, off_t byte_index)
|
||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
translate_rule_to_color (WEdit * edit, edit_syntax_rule_t rule)
|
translate_rule_to_color (const WEdit * edit, edit_syntax_rule_t rule)
|
||||||
{
|
{
|
||||||
return edit->rules[rule.context]->keyword[rule.keyword]->color;
|
return edit->rules[rule.context]->keyword[rule.keyword]->color;
|
||||||
}
|
}
|
||||||
|
|
|
@ -126,7 +126,7 @@ begin_paragraph (WEdit * edit, int force)
|
||||||
long i;
|
long i;
|
||||||
for (i = edit->curs_line - 1; i >= 0; i--)
|
for (i = edit->curs_line - 1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
if (line_is_blank (edit, i))
|
if (edit_line_is_blank (edit, i))
|
||||||
{
|
{
|
||||||
i++;
|
i++;
|
||||||
break;
|
break;
|
||||||
|
@ -155,7 +155,7 @@ end_paragraph (WEdit * edit, int force)
|
||||||
long i;
|
long i;
|
||||||
for (i = edit->curs_line + 1; i <= edit->total_lines; i++)
|
for (i = edit->curs_line + 1; i <= edit->total_lines; i++)
|
||||||
{
|
{
|
||||||
if (line_is_blank (edit, i))
|
if (edit_line_is_blank (edit, i))
|
||||||
{
|
{
|
||||||
i--;
|
i--;
|
||||||
break;
|
break;
|
||||||
|
@ -398,12 +398,14 @@ put_paragraph (WEdit * edit, unsigned char *t, off_t p, int indent, int size)
|
||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
test_indent (WEdit * edit, off_t p, off_t q)
|
test_indent (const WEdit * edit, off_t p, off_t q)
|
||||||
{
|
{
|
||||||
int indent;
|
int indent;
|
||||||
|
|
||||||
indent = edit_indent_width (edit, p++);
|
indent = edit_indent_width (edit, p++);
|
||||||
if (!indent)
|
if (indent == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
for (; p < q; p++)
|
for (; p < q; p++)
|
||||||
if (edit_get_byte (edit, p - 1) == '\n')
|
if (edit_get_byte (edit, p - 1) == '\n')
|
||||||
if (indent != edit_indent_width (edit, p))
|
if (indent != edit_indent_width (edit, p))
|
||||||
|
@ -424,7 +426,7 @@ format_paragraph (WEdit * edit, int force)
|
||||||
int indent = 0;
|
int indent = 0;
|
||||||
if (option_word_wrap_line_length < 2)
|
if (option_word_wrap_line_length < 2)
|
||||||
return;
|
return;
|
||||||
if (line_is_blank (edit, edit->curs_line))
|
if (edit_line_is_blank (edit, edit->curs_line))
|
||||||
return;
|
return;
|
||||||
p = begin_paragraph (edit, force);
|
p = begin_paragraph (edit, force);
|
||||||
q = end_paragraph (edit, force);
|
q = end_paragraph (edit, force);
|
||||||
|
|
Loading…
Reference in New Issue