Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions doc/man/mc.1.in
Original file line number Diff line number Diff line change
Expand Up @@ -3683,6 +3683,20 @@ and that is the default value.
Controls if scrolling with the mouse is done by pages or line by line
on the internal file viewer.
.TP
.I quickview_image_protocol
Selects how images are shown in the quick view panel. Possible values are:
.B auto
(default; detect the terminal from the environment),
.B iterm2
(iTerm2 inline images protocol, used by iTerm2, WezTerm and others; all
image formats supported by the terminal),
.B kitty
(kitty graphics protocol, used by kitty, Ghostty and others; PNG files
only) and
.B none
(never show images). Explicitly selected protocol is used even if the
terminal can't be detected, but never inside tmux or screen.
.TP
.I only_leading_plus_minus
Allow special treatment for '+', '\-', '*' in the command line (select,
unselect, reverse selection) only if the command line is empty. You
Expand Down
1 change: 1 addition & 0 deletions src/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ static const struct
{ "editor_stop_format_chars", &edit_options.stop_format_chars, "-+*\\,.;:&>" },
#endif
{ "mcview_eof", &mcview_show_eof, "" },
{ "quickview_image_protocol", &mcview_image_protocol, "auto" },
{ NULL, NULL, NULL },
};

Expand Down
1 change: 1 addition & 0 deletions src/viewer/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ libmcviewer_la_SOURCES = \
display.c \
growbuf.c \
hex.c \
image.c \
internal.h \
lib.c \
mcviewer.c \
Expand Down
1 change: 1 addition & 0 deletions src/viewer/actions_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,7 @@ mcview_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, void *da
if (mc_global.midnight_shutdown)
mcview_ok_to_quit (view);
}
mcview_image_forget (view, FALSE);
mcview_done (view);
mcview_remove_ext_script (view);
return MSG_HANDLED;
Expand Down
10 changes: 10 additions & 0 deletions src/viewer/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,16 @@ mcview_update (WView *view)
void
mcview_display (WView *view)
{
if (mcview_image_active (view))
{
mcview_display_clean (view);
mcview_display_status (view);
mcview_image_draw (view);
return;
}

mcview_image_forget (view, TRUE);

if (view->mode_flags.hex)
mcview_display_hex (view);
else
Expand Down
Loading
Loading