diff --git a/metainfo.xml b/metainfo.xml index 2a30548063..6ba21465b7 100644 --- a/metainfo.xml +++ b/metainfo.xml @@ -104,6 +104,7 @@ diff --git a/src/contour/Config.cpp b/src/contour/Config.cpp index 875a3eb30d..a8fd282e29 100644 --- a/src/contour/Config.cpp +++ b/src/contour/Config.cpp @@ -1705,7 +1705,6 @@ void loadConfigFromFile(Config& _config, FileSystem::path const& _fileName) } tryLoadValue(usedKeys, doc, "images.sixel_scrolling", _config.sixelScrolling); - tryLoadValue(usedKeys, doc, "images.sixel_cursor_conformance", _config.sixelCursorConformance); tryLoadValue(usedKeys, doc, "images.sixel_register_count", _config.maxImageColorRegisters); tryLoadValue(usedKeys, doc, "images.max_width", _config.maxImageSize.width); tryLoadValue(usedKeys, doc, "images.max_height", _config.maxImageSize.height); diff --git a/src/contour/Config.h b/src/contour/Config.h index e98bad2731..4e1495ede0 100644 --- a/src/contour/Config.h +++ b/src/contour/Config.h @@ -283,7 +283,6 @@ struct Config std::shared_ptr loggingSink; bool sixelScrolling = true; - bool sixelCursorConformance = true; terminal::ImageSize maxImageSize = {}; // default to runtime system screen size. unsigned maxImageColorRegisters = 4096; diff --git a/src/contour/TerminalSession.cpp b/src/contour/TerminalSession.cpp index c291d2c54e..959d641fbe 100644 --- a/src/contour/TerminalSession.cpp +++ b/src/contour/TerminalSession.cpp @@ -110,7 +110,6 @@ TerminalSession::TerminalSession(unique_ptr _pty, ContourGuiApp& _app): config_.bypassMouseProtocolModifier, // TODO: you too config_.maxImageSize, config_.maxImageColorRegisters, - config_.sixelCursorConformance, profile_.colors, 50.0, config_.reflowOnResize, @@ -1088,7 +1087,6 @@ void TerminalSession::configureTerminal() SessionLog()("Setting terminal ID to {}.", profile_.terminalId); terminal_.setTerminalId(profile_.terminalId); - terminal_.setSixelCursorConformance(config_.sixelCursorConformance); terminal_.setMaxImageColorRegisters(config_.maxImageColorRegisters); terminal_.setMaxImageSize(config_.maxImageSize); terminal_.setMode(terminal::DECMode::NoSixelScrolling, !config_.sixelScrolling); diff --git a/src/contour/contour.yml b/src/contour/contour.yml index 7af411e8e2..e99e0bd329 100644 --- a/src/contour/contour.yml +++ b/src/contour/contour.yml @@ -125,9 +125,6 @@ images: sixel_scrolling: true # Configures the maximum number of color registers available when rendering Sixel graphics. sixel_register_count: 4096 - # If enabled, the ANSI text cursor is placed at the position of the sixel graphics cursor after - # image rendering, otherwise (if disabled) the cursor is placed underneath the image. - sixel_cursor_conformance: true # maximum width in pixels of an image to be accepted (0 defaults to system screen pixel width) max_width: 0 # maximum height in pixels of an image to be accepted (0 defaults to system screen pixel height) diff --git a/src/terminal/Screen.cpp b/src/terminal/Screen.cpp index 56f62eaece..6ab7c09be7 100644 --- a/src/terminal/Screen.cpp +++ b/src/terminal/Screen.cpp @@ -1598,9 +1598,6 @@ void Screen::sixelImage(ImageSize _pixelSize, Image::Data&& _data) alignmentPolicy, resizePolicy, autoScrollAtBottomMargin); - - if (!_terminal.isModeEnabled(DECMode::SixelCursorNextToGraphic)) - linefeed(topLeft.column); } template @@ -2186,7 +2183,6 @@ namespace impl case 2026: return DECMode::BatchedRendering; case 2027: return DECMode::Unicode; case 2028: return DECMode::TextReflow; - case 8452: return DECMode::SixelCursorNextToGraphic; } return nullopt; } diff --git a/src/terminal/Terminal.cpp b/src/terminal/Terminal.cpp index ca6032e3fb..dffb6e0e02 100644 --- a/src/terminal/Terminal.cpp +++ b/src/terminal/Terminal.cpp @@ -95,7 +95,6 @@ Terminal::Terminal(unique_ptr _pty, Modifier _mouseProtocolBypassModifier, ImageSize _maxImageSize, unsigned _maxImageColorRegisters, - bool _sixelCursorConformance, ColorPalette _colorPalette, double _refreshRate, bool _allowReflowOnResize, @@ -121,7 +120,6 @@ Terminal::Terminal(unique_ptr _pty, _maxHistoryLineCount, _maxImageSize, _maxImageColorRegisters, - _sixelCursorConformance, move(_colorPalette), _allowReflowOnResize }, // clang-format on @@ -148,7 +146,6 @@ Terminal::Terminal(unique_ptr _pty, setMode(DECMode::AutoWrap, true); setMode(DECMode::Unicode, true); setMode(DECMode::TextReflow, true); - setMode(DECMode::SixelCursorNextToGraphic, state_.sixelCursorConformance); #endif } @@ -1505,7 +1502,6 @@ void Terminal::hardReset() setMode(DECMode::AutoWrap, true); setMode(DECMode::Unicode, true); setMode(DECMode::TextReflow, state_.allowReflowOnResize); - setMode(DECMode::SixelCursorNextToGraphic, state_.sixelCursorConformance); state_.primaryBuffer.reset(); state_.alternateBuffer.reset(); diff --git a/src/terminal/Terminal.h b/src/terminal/Terminal.h index 66b14a000f..3676a5ea10 100644 --- a/src/terminal/Terminal.h +++ b/src/terminal/Terminal.h @@ -92,7 +92,6 @@ class Terminal Modifier _mouseProtocolBypassModifier = Modifier::Shift, ImageSize _maxImageSize = ImageSize { Width(800), Height(600) }, unsigned _maxImageColorRegisters = 256, - bool _sixelCursorConformance = true, ColorPalette _colorPalette = {}, double _refreshRate = 30.0, bool _allowReflowOnResize = true, @@ -108,7 +107,6 @@ class Terminal LineCount maxHistoryLineCount() const noexcept; void setTerminalId(VTType _id) noexcept { state_.terminalId = _id; } - void setSixelCursorConformance(bool _value) noexcept { state_.sixelCursorConformance = _value; } void setMaxImageSize(ImageSize size) noexcept { state_.maxImageSize = size; } diff --git a/src/terminal/TerminalState.cpp b/src/terminal/TerminalState.cpp index 5b823cb43f..31282a05f0 100644 --- a/src/terminal/TerminalState.cpp +++ b/src/terminal/TerminalState.cpp @@ -25,7 +25,6 @@ TerminalState::TerminalState(Terminal& _terminal, LineCount _maxHistoryLineCount, ImageSize _maxImageSize, unsigned _maxImageColorRegisters, - bool _sixelCursorConformance, ColorPalette _colorPalette, bool _allowReflowOnResize): terminal { _terminal }, @@ -42,7 +41,6 @@ TerminalState::TerminalState(Terminal& _terminal, imagePool { [this](Image const* _image) { terminal.discardImage(*_image); } }, - sixelCursorConformance { _sixelCursorConformance }, allowReflowOnResize { _allowReflowOnResize }, primaryBuffer { Grid(_pageSize, _allowReflowOnResize, _maxHistoryLineCount) }, alternateBuffer { Grid(_pageSize, false, LineCount(0)) }, @@ -115,7 +113,6 @@ std::string to_string(DECMode _mode) case DECMode::BatchedRendering: return "BatchedRendering"; case DECMode::Unicode: return "Unicode"; case DECMode::TextReflow: return "TextReflow"; - case DECMode::SixelCursorNextToGraphic: return "SixelCursorNextToGraphic"; } return fmt::format("({})", static_cast(_mode)); } diff --git a/src/terminal/TerminalState.h b/src/terminal/TerminalState.h index 371965f1e0..64d3ad0bd1 100644 --- a/src/terminal/TerminalState.h +++ b/src/terminal/TerminalState.h @@ -130,7 +130,6 @@ struct TerminalState LineCount _maxHistoryLineCount, ImageSize _maxImageSize, unsigned _maxImageColorRegisters, - bool _sixelCursorConformance, ColorPalette _colorPalette, bool _allowReflowOnResize); @@ -159,8 +158,6 @@ struct TerminalState std::shared_ptr imageColorPalette; ImagePool imagePool; - bool sixelCursorConformance = true; - std::vector tabs; bool allowReflowOnResize; diff --git a/src/terminal/primitives.h b/src/terminal/primitives.h index b1a0786d65..6a9f7f18a2 100644 --- a/src/terminal/primitives.h +++ b/src/terminal/primitives.h @@ -709,12 +709,6 @@ enum class DECMode // If this mode is set, the current line and any line below is allowed to reflow. // Default: Enabled (if supported by terminal). TextReflow = 2028, - - // If enabled (default, as per spec), then the cursor is left next to the graphic, - // that is, the text cursor is placed at the position of the sixel cursor. - // If disabled otherwise, the cursor is placed below the image, as if CR LF was sent, - // which is how xterm behaves by default (sadly). - SixelCursorNextToGraphic = 8452, // }}} }; @@ -798,7 +792,6 @@ constexpr unsigned toDECModeNum(DECMode m) case DECMode::BatchedRendering: return 2026; case DECMode::Unicode: return 2027; case DECMode::TextReflow: return 2028; - case DECMode::SixelCursorNextToGraphic: return 8452; } return static_cast(m); } @@ -842,7 +835,6 @@ constexpr bool isValidDECMode(unsigned int _mode) noexcept case DECMode::BatchedRendering: case DECMode::Unicode: case DECMode::TextReflow: - case DECMode::SixelCursorNextToGraphic: //. return true; }