|
@@ -402,7 +402,7 @@ mcview_get_next_maybe_nroff_char (WView * view, mcview_state_machine_t * state,
|
|
|
if (color != NULL)
|
|
|
*color = VIEW_NORMAL_COLOR;
|
|
|
|
|
|
- if (!view->text_nroff_mode)
|
|
|
+ if (!view->mode_flags.nroff)
|
|
|
return mcview_get_next_char (view, state, c);
|
|
|
|
|
|
if (!mcview_get_next_char (view, state, c))
|
|
@@ -583,7 +583,7 @@ mcview_display_line (WView * view, mcview_state_machine_t * state, int row,
|
|
|
const screen_dimen top = view->data_area.top;
|
|
|
const screen_dimen width = view->data_area.width;
|
|
|
const screen_dimen height = view->data_area.height;
|
|
|
- off_t dpy_text_column = view->text_wrap_mode ? 0 : view->dpy_text_column;
|
|
|
+ off_t dpy_text_column = view->mode_flags.wrap ? 0 : view->dpy_text_column;
|
|
|
screen_dimen col = 0;
|
|
|
int cs[1 + MAX_COMBINING_CHARS];
|
|
|
char str[(1 + MAX_COMBINING_CHARS) * UTF8_CHAR_LEN + 1];
|
|
@@ -592,7 +592,7 @@ mcview_display_line (WView * view, mcview_state_machine_t * state, int row,
|
|
|
if (paragraph_ended != NULL)
|
|
|
*paragraph_ended = TRUE;
|
|
|
|
|
|
- if (!view->text_wrap_mode && (row < 0 || row >= (int) height) && linewidth == NULL)
|
|
|
+ if (!view->mode_flags.wrap && (row < 0 || row >= (int) height) && linewidth == NULL)
|
|
|
{
|
|
|
/* Optimization: Fast forward to the end of the line, rather than carefully
|
|
|
* parsing and then not actually displaying it. */
|
|
@@ -661,7 +661,7 @@ mcview_display_line (WView * view, mcview_state_machine_t * state, int row,
|
|
|
/* In wrap mode only: We're done with this row if the character sequence wouldn't fit.
|
|
|
* Except if at the first column, because then it wouldn't fit in the next row either.
|
|
|
* In this extreme case let the unwrapped code below do its best to display it. */
|
|
|
- if (view->text_wrap_mode && (off_t) col + charwidth > dpy_text_column + (off_t) width
|
|
|
+ if (view->mode_flags.wrap && (off_t) col + charwidth > dpy_text_column + (off_t) width
|
|
|
&& col > 0)
|
|
|
{
|
|
|
*state = state_saved;
|
|
@@ -730,7 +730,7 @@ mcview_display_line (WView * view, mcview_state_machine_t * state, int row,
|
|
|
col += charwidth;
|
|
|
state->unwrapped_column += charwidth;
|
|
|
|
|
|
- if (!view->text_wrap_mode && (off_t) col >= dpy_text_column + (off_t) width
|
|
|
+ if (!view->mode_flags.wrap && (off_t) col >= dpy_text_column + (off_t) width
|
|
|
&& linewidth == NULL)
|
|
|
{
|
|
|
/* Optimization: Fast forward to the end of the line, rather than carefully
|
|
@@ -870,7 +870,7 @@ mcview_display_text (WView * view)
|
|
|
mcview_display_clean (view);
|
|
|
mcview_display_ruler (view);
|
|
|
|
|
|
- if (!view->text_wrap_mode)
|
|
|
+ if (!view->mode_flags.wrap)
|
|
|
mcview_state_machine_init (&state, view->dpy_start);
|
|
|
else
|
|
|
{
|
|
@@ -888,7 +888,7 @@ mcview_display_text (WView * view)
|
|
|
* scroll the file and display again. This happens when e.g. the
|
|
|
* window is made bigger, or the file becomes shorter due to
|
|
|
* charset change or enabling nroff. */
|
|
|
- if ((view->text_wrap_mode ? view->dpy_state_top.offset : view->dpy_start) > 0)
|
|
|
+ if ((view->mode_flags.wrap ? view->dpy_state_top.offset : view->dpy_start) > 0)
|
|
|
{
|
|
|
mcview_ascii_move_up (view, height - row);
|
|
|
again = TRUE;
|
|
@@ -940,7 +940,7 @@ mcview_ascii_move_down (WView * view, off_t lines)
|
|
|
|
|
|
/* Okay, there's enough data. Move by 1 row at the top, too. No need to check for
|
|
|
* EOF, that can't happen. */
|
|
|
- if (!view->text_wrap_mode)
|
|
|
+ if (!view->mode_flags.wrap)
|
|
|
{
|
|
|
view->dpy_start = mcview_eol (view, view->dpy_start);
|
|
|
view->dpy_paragraph_skip_lines = 0;
|
|
@@ -977,7 +977,7 @@ mcview_ascii_move_down (WView * view, off_t lines)
|
|
|
void
|
|
|
mcview_ascii_move_up (WView * view, off_t lines)
|
|
|
{
|
|
|
- if (!view->text_wrap_mode)
|
|
|
+ if (!view->mode_flags.wrap)
|
|
|
{
|
|
|
while (lines-- != 0)
|
|
|
view->dpy_start = mcview_bol (view, view->dpy_start - 1, 0);
|
|
@@ -1027,7 +1027,7 @@ mcview_ascii_move_up (WView * view, off_t lines)
|
|
|
void
|
|
|
mcview_ascii_moveto_bol (WView * view)
|
|
|
{
|
|
|
- if (!view->text_wrap_mode)
|
|
|
+ if (!view->mode_flags.wrap)
|
|
|
view->dpy_text_column = 0;
|
|
|
}
|
|
|
|
|
@@ -1036,7 +1036,7 @@ mcview_ascii_moveto_bol (WView * view)
|
|
|
void
|
|
|
mcview_ascii_moveto_eol (WView * view)
|
|
|
{
|
|
|
- if (!view->text_wrap_mode)
|
|
|
+ if (!view->mode_flags.wrap)
|
|
|
{
|
|
|
mcview_state_machine_t state;
|
|
|
off_t linewidth;
|