diff --git a/readme.md b/readme.md index 799d334db5..7d5f7a2d69 100644 --- a/readme.md +++ b/readme.md @@ -39,10 +39,7 @@ Besides windowed mode, vtm can operate as a standalone terminal emulator inside - Unlimited scrollback* - Unwrapped-text option - Horizontal scrolling -- Selected-text copy encoding: - - RTF file format - - HTML code - - ANSI escape sequences +- Rich text copy Basicly, it allows users to use a huge scrollback buffer with text wrapping disabled, taking advantage of horizontal scrolling within whatever text console they happen to use. diff --git a/src/netxs/desktopio/application.hpp b/src/netxs/desktopio/application.hpp index 1b42e5e9b8..d195d15b61 100644 --- a/src/netxs/desktopio/application.hpp +++ b/src/netxs/desktopio/application.hpp @@ -23,7 +23,7 @@ namespace netxs::app namespace netxs::app::shared { - static const auto version = "v0.9.12"; + static const auto version = "v0.9.13"; static const auto desktopio = "desktopio"; static const auto logsuffix = "_log"; static const auto usr_config = "~/.config/vtm/settings.xml"; diff --git a/src/netxs/desktopio/consrv.hpp b/src/netxs/desktopio/consrv.hpp index 44a55ccbe2..b3cd33e1ae 100644 --- a/src/netxs/desktopio/consrv.hpp +++ b/src/netxs/desktopio/consrv.hpp @@ -1106,6 +1106,22 @@ struct impl : consrv template auto readline(L& lock, bool& cancel, bool utf16, bool EOFon, ui32 stops, text& nameview) { + static constexpr auto noalias = ""sv; + + if (nameview == noalias && server.inpmod & nt::console::inmode::echo) + { + lock.unlock(); + if constexpr (isreal()) + { + server.uiterm.update([&] + { + auto& term = server.uiterm; + term.ondata("(Ctrl+C to Yes) "); + }); + } + lock.lock(); + } + //todo bracketed paste support // save server.uiterm.bpmode // server.uiterm.bpmode = true; @@ -1255,12 +1271,20 @@ struct impl : consrv else if (c == '\t') { burn(); hist.save(line); line.insert(" ", mode); } else if (c == 'C' - '@') { - hist.save(line); - cooked.ustr = "\n"; - done = true; - crlf = 2; - line.insert(cell{}.c0_to_txt(c), mode); - if (n == 0) pops++; + if (nameview == noalias) + { + line = "y"; + cook(c, 1); + } + else + { + hist.save(line); + cooked.ustr = "\n"; + done = true; + crlf = 2; + line.insert(cell{}.c0_to_txt(c), mode); + if (n == 0) pops++; + } } else { diff --git a/src/netxs/desktopio/system.hpp b/src/netxs/desktopio/system.hpp index 3b4de13228..90c40c19d1 100644 --- a/src/netxs/desktopio/system.hpp +++ b/src/netxs/desktopio/system.hpp @@ -4182,7 +4182,7 @@ namespace netxs::os check(changed, m.doubled, !!(r.Event.MouseEvent.dwEventFlags & DOUBLE_CLICK)); check(changed, m.wheeled, !!(r.Event.MouseEvent.dwEventFlags & MOUSE_WHEELED)); check(changed, m.hzwheel, !!(r.Event.MouseEvent.dwEventFlags & MOUSE_HWHEELED)); - check(changed, m.wheeldt, static_cast((0xFFFF0000 & r.Event.MouseEvent.dwButtonState) >> 16)); // dwButtonState too large when mouse scrolls + check(changed, m.wheeldt, static_cast((0xFFFF0000 & r.Event.MouseEvent.dwButtonState) >> 16)); // dwButtonState too large when mouse scrolls if (!(dtvt::vtmode & ui::console::nt16 && m.wheeldt)) // Skip the mouse coord update when wheeling on win7/8 (broken coords). { check(changed, m.coordxy, twod{ r.Event.MouseEvent.dwMousePosition.X, r.Event.MouseEvent.dwMousePosition.Y }); @@ -4190,7 +4190,7 @@ namespace netxs::os if (changed || m.wheeled || m.hzwheel) // Don't fire the same state (conhost fires the same events every second). { m.changed++; - mouse(m); // Fire mouse event to update kb modifiers. + mouse(m); } } else if (r.EventType == WINDOW_BUFFER_SIZE_EVENT)