mirror of
https://github.com/microsoft/terminal.git
synced 2026-09-24 16:05:21 +00:00
scroll-out in secondary console buffer pollutes main scrollback buffer #22232
Closed
opened 2026-01-31 08:07:16 +00:00 by claunia
·
24 comments
No Branch/Tag Specified
main
dev/duhowett/fhl-2026/remove-paste-hairpin-handler
dev/duhowett/win7-wpf-termcontrol-squash
dev/lhecker/20226-present-leaks
dev/duhowett/wpf-1-autoscroll-to-interactivity
dev/duhowett/wpf-3-swapchain-handle
dev/duhowett/wpf-2-midi-audio-timer
dev/migrie/overview-for-pr
dev/migrie/b/markdown-paste
dev/duhowett/padding-in-atlas
fix/german-split-pane-tooltip
release-1.25
dev/cazamor/sui-rejuv/fix-spaces
dev/migrie/per-window-final
dev/cazamor/selfhost/2026-08-31
dev/migrie/b/independent-animations
dev/pabhoj/wtcli
dev/cazamor/conhost/bugfix-a11y-find
dev/cazamor/conhost/bugfix-a11y-find-1.24
dev/lhecker/theme-quality-test
dev/lhecker/theme-quality
dev/cazamor/selfhost/sui-rejuv
dev/cazamor/fix/search-selection-off-by-one
dev/duhowett/even-more-builtin-glyphs
dev/crutkas/kitty-pr1
dev/cazamor/toast/activity
release-1.24
users/GitHubPolicyService/d8615b98-f5fa-4462-bf7f-c44a1cc12096
dev/cazamor/selfhost/2026-06-18
dev/migrie/f/new-profile-subcommand
dev/cazamor/sui-rejuv/profiles-v2
dev/duhowett/asan-for-all
dev/cazamor/sui-rejuv/profiles-new
dev/cazamor/sui-rejuv/expander-groups-new
dev/cazamor/auto-save/refresh-settings
feature/llm
dev/cazamor/auto-save/model/json-manager
dev/cazamor/auto-save/settings-model
dev/migrie/s/snippet-params
users/merlinbot/1es-pt-auto-baselining-pr
niels9001/inactive-tab-foreground
dev/cazamor/selfhost/2026-05-20-home
dev/duhowett/fzf-vcxproj
dev/cazamor/selfhost/2026-05-20
dev/cazamor/selfhost/2026-05-19
dev/cazamor/selfhost/2026-05-18
niels9001/fontweight-fixes
niels9001/page-transitions
dev/duhowett/fhl-2026/rewrite-paste-and-dragdrop-handling-writeinputstring
dev/migrie/f/overview-view
dev/cazamor/selfhost/2026-05-13
dev/cazamor/selfhost/2026-05-13-sui
dev/yeelam/f/BuildTest
dev/duhowett/hax/our-own-tabview
dev/cazamor/bugfix/close-scratchpad
dev/cazamor/selfhost/2026-05-05
dev/cazamor/selfhost/2026-05-04-workspaces
dev/cazamor/selfhost/2026-05-04
dev/lhecker/20149-hotfix
dev/lhecker/osc-7-wsl
dev/migrie/workspaces-real
dev/migrie/fhl-spring-2026/quake-4
dev/lhecker/pwsh-5.1
dev/cazamor/sui/dropdown-page
dev/cazamor/selfhost/2026-04-08
dev/cazamor/selfhost/2026-04-06
dev/migrie/fhl-spring-2026/confirmCloseOn
dev/cazamor/confirmCloseOn/dont-ask-me-again
dev/lhecker/inproc-conpty
dev/duhowett/powershell-module-supercharger
dev/cazamor/a11y/vt-seq-prototype
dev/migrie/fhl-spring26/osc777-2
dev/migrie/fhl-spring26/2/notification-infrastructure
dev/migrie/fhl-spring-2026/side-tabs
dev/cazamor/copilot/playground
dev/migrie/fhl-spring-2026/quake-3.5
dev/migrie/fhl-spring26/osc777
dev/migrie/fhl-spring26/unpackaged-notify
dev/migrie/fhl-spring26/bellStyle-notification
dev/migrie/fhl-spring26/activity-notifications
dev/migrie/fhl-spring-2026/x-open
dev/migrie/fhl-spring-2026/quake-5
dev/migrie/fhl-spring26/nextTab-filter
dev/duhowett/atlas-draw-d2d-dots-curlies-consistently
dev/lhecker/14165-conhost-font-size
dev/lhecker/ottosson-by-default
dev/duhowett/hax/unix-pty
dev/duhowett/hax/cmake
dev/lhecker/generate-256-colors
dev/lhecker/dcs-perf
dev/lhecker/1410-large-scrollback
dev/cazamor/selfhost/2026-02-10
dev/lhecker/11509-kitty-keyboard-protocol-wip
dev/cazamor/selfhost/2026-01-29
dev/lhecker/benchcat-fix
dev/duhowett/eoy-25/allow-set-foreground
release-1.23
dev/cazamor/bot/deprecate-area-atlasengine
dev/cazamor/selfhost/2026-01-20
dev/cazamor/selfhost/2026-01-12
dev/cazamor/spec/auto-save
dev/duhowett/fhl-2024/asciicast-recorder
dev/duhowett/eoy-25/underline-colors-in-atlas-bug
dev/duhowett/hax/serial-port-support
dev/duhowett/connection-utf8
dev/lhecker/fused-event
dev/lhecker/18928-wip
dev/duhowett/fhl-2024/clang
dev/duhowett/vt-cache-changes
dev/cazamor/uia-leak
release-1.22
dev/cazamor/selfhost/11-18-v3
dev/cazamor/selfhost/11-18
dev/duhowett/fhl-2025/bitmap-fonts
dev/duhowett/server-2025-vms
dev/duhowett/cant-believe-gotta-do-this-shit
dev/lhecker/dark-mode
dev/cazamor/sui/invert-cursor-color
dev/duhowett/fhl-2025/wt-command-palette-cmdpal-integration
dev/duhowett/fhl-2025/wt-json-relative-icons
dev/lhecker/fucking-service-locator
dev/duhowett/unicode-17
dev/duhowett/multi-blern
dev/lhecker/wellp2-alt
dev/duhowett/wellp2
dev/lhecker/1860-horizontal-scrollbar
dev/lhecker/fix-window-count
dev/cazamor/sui/tab-color-old
dev/duhowett/hax/conhost-icon
dev/duhowett/hax/sui-color-chip-border
dev/duhowett/hax/terminalsettings-as-a-lib-/with-types-merged-into-tsm
dev/pabhoj/page_control_input_cleanup
dev/duhowett/padding-in-atlas-rebase-20250729
dev/lhecker/attach-thread-input
dev/duhowett/portable-shader-members
msbuildcache-reenable
dev/cazamor/selfhost/1.24-2025-06-10
dev/cazamor/upgrade-settings-containers
dev/cazamor/sui/ext-page/powershell-stub
dev/cazamor/selfhost/1.24-2025-05-15
dev/pabhoj/sui_action_overhaul
dev/cazamor/selfhost/1.24-2025-05-06
dev/cazamor/selfhost/1.24-2025-04-29
dev/cazamor/sui/ext-page/lazy-load-objects
dev/cazamor/sui/ext-page/badge
dev/cazamor/selfhost/1.24
dev/lhecker/sdk-26100
dev/duhowett/testing
dev/jadelaga/VS-Pty.Net-1.22
dev/duhowett/fhl-2025/what-if-no-content-ids
dev/lhecker/18584-part2
dev/lhecker/get-lang-id
dev/duhowett/hax/clogs
release-1.21
dev/pabhoj/featurellm_fix_paste
dev/lhecker/grapheme-backup
dev/jadelaga/VS-Pty.netFixes
dev/lhecker/atlas-engine-compute-shader
dev/migrie/s/ai-providers
dev/lhecker/animated-cursor-wip
dev/pabhoj/featurellm_timeout
dev/lhecker/dark-mode-alt
dev/duhowett/osc-strided-table
dev/lhecker/bugbash
dev/pabhoj/featurellm_improve_parsing
dev/duhowett/coast-to-coast
dev/lhecker/curly-improvements
dev/duhowett/net8
dev/duhowett/onebranch-custom-pool
dev/lhecker/renderer-overhaul-2nd-attempt
dev/lhecker/cleanup
dev/cazamor/sui/confirmation-announcements
dev/lhecker/winconpty-cleanup
dev/duhowett/learn/rewrite-highlights
dev/migrie/b/no-nesting-when-searching
release-1.20
dev/duhowett/sel-2-spans
dev/lhecker/7118-cursor-color
dev/lhecker/remove-glyph-width
dev/lhecker/igfw-scroll-region
dev/lhecker/17656-win32im-double-encoding
dev/duhowett/fhl-2024/merge-idls
dev/duhowett/feed-forward-variables
dev/lhecker/remove-chrome-math
dev/duhowett/copylink
dev/duhowett/applicableactions
gh-readonly-queue/main/pr-17566-de50310295b7d92ed3d51f07974a2a945776bf9d
dev/lhecker/atlas-engine-stride-copy
dev/migrie/b/bump-nuget-in-c
dev/migrie/f/992-redux-redux
dev/migrie/f/filter-weight-input-too
dev/migrie/f/disable-nesting
dev/migrie/f/local-snippets-cleaner
dev/migrie/s/1553-mouse-bindings
selfhost-1.22-bugbash-2024-06-04
selfhost/1.22-bugbash-2024-06-04
dev/lhecker/15689-tab-drag-crash-fix
dev/migrie/f/sxnui-font-size-change
dev/migrie/f/local-snippets-on-action-refactor
dev/migrie/f/just-local-snippets
dev/migrie/save-input-patches
dev/migrie/f/md-pane-official
dev/migrie/base-pane
dev/migrie/fhl/tasks-pane
release-1.19
dev/migrie/b/17130-clear-marks-2
dev/migrie/b/17075-its-me-the-killer
dev/duhowett/i-figured-out-why-sometimes-the-publish-build-failed
dev/duhowett/nuget-publication-with-aad-app-id
selfhost-1.20
dev/duhowett/graph
dev/migrie/b/15803-activate-dont-copypasta
dev/duhowett/is-pgo-broken-because-of-sui-being-slower
dev/migrie/b/remove-terminaltab
dev/migrie/fhl/md-pane
dev/migrie/fhl/local-tasks-2024
dev/migrie/fhl/2024-inline-notebook
dev/duhowett/interface-projects
dev/duhowett/dead-loc
release-1.18
dev/migrie/fhl/2024-spring-merge-base
dev/duhowett/hax/l9
inbox
dev/migrie/14073-on-main
dev/duhowett/hax/conhost_dump_replay
user/lhecker/atlas-engine-srgb
dev/migrie/fhl/sxnui-tooltips-3
dev/migrie/7718-notifications-experiments
dev/migrie/fhl/7718-notifications
dev/migrie/fhl/7718-notifications-reboot
dev/lhecker/remove-gsl
dev/lhecker/16575-TerminateProcess
dev/lhecker/window-thread-climate-control
dev/lhecker/client-context-input-output-mode
dev/lhecker/ring-buffer-input-buffer
release-1.17
dev/lhecker/propsheet-fontdlg-refactor
dev/lhecker/renderer-overhaul
dev/pabhoj/test
dev/duhowett/chop
dev/lhecker/til-ulong-cleanup
dev/lhecker/til-env-cleanup
dev/migrie/f/16005-a11y-pane
dev/cazamor/a11y/fastpass
dev/migrie/b/15487-push-cwd
dev/migrie/b/15536-or-15219-idk
dev/duhowett/move-timers-down-into-core-interactivity-etc
dev/migrie/b/15812-broadcast-paste-two
dev/migrie/fhl-fall-2023/11162-quake-III-arena
dev/migrie/fhl-fall-2023/1620-automatic-tab-progress
dev/migrie/fhl-fall-2023/9992-quake-II
dev/migrie/fhl-fall-2023/9992-default-quake-settings
dev/migrie/fhl-fall-2023/9992-window-name-settings
dev/migrie/fhl-fall-2023/oceans
dev/lhecker/ColorScheme-improvements
dev/migrie/search-v2-v3
dev/migrie/pr-15717/its-dangerous-to-go-alone
dev/migrie/f/4768-taskbar-icons
dev/migrie/f/3121-tooltips
dev/duhowett/sticky-control
dev/duhowett/fix-tracing-2
dev/migrie/b/add-support-for-vsc-marks
dev/migrie/f/1860-this-is-literally-what-less-is-for
dev/migrie/s/5916-draft
dev/lhecker/tracy
dev/migrie/s/north-star
dev/cazamor/tag-youre-it
dev/migrie/f/12336-let-it-mellow
dev/migrie/f/now-with-more-compat-settings
dev/migrie/f/compatibility-sui
dev/duhowett/hax/wpf-atlas
dev/duhowett/fgb
dev/migrie/b/15487-relative-paths-are-hard
dev/lhecker/colrv1
loc-update
dev/migrie/fhl/dyndep-csharp
dev/migrie/fhl/dyndep
dev/migrie/fhl-clickable-send-input
dev/migrie/f/cwd-hijinks-5506-15173
dev/lhecker/openconsole-async-start
1.17
dev/migrie/bump-scratch
dev/migrie/f/3726-restartConnection
dev/migrie/b/cxn-restarting-attempt-1-backport
dev/migrie/b/9053-part-3-the-actual-doing-of-the-thing
dev/migrie/b/13388-focus-logger
dev/migrie/b/9053-part-4-i-guess-defterm
dev/migrie/oop/3/of-the-silmarils
of-the-darkening-of-valinor
dev/migrie/fhl/notebook-proto-000
dev/migrie/f/narrator-buddy
dev/migrie/mux-2.8.2-march-2023
dev/migrie/f/roast-mutton
dev/migrie/f/12861-preview-input
dev/lhecker/clang-tidy
dev/migrie/f/3121-wE-dOnT-hAvE-dEv-DaYs
dev/duhowett/compiler-compliance
dev/duhowett/i-have-a-burning-hatred-for-ntstatus-of-later-so-why-not-fix-it
dev/duhowett/shorthand-namespaces
dev/duhowett/rename-all-dlls
dev/duhowett/errordialog
dev/lhecker/gsl-narrow
dev/migrie/b/11522-dumb-idea
release-1.16
dev/miniksa/env
dev/duhowett/hax/embed-everything
dev/migrie/b/13388-attempt-003
dev/migrie/b/14512-test-research
dev/migrie/b/13388-attempt-002
dev/migrie/b/14464-copyOnSelect-moving-text
dev/migrie/s/thema-schema-for-1.16
dev/migrie/s/theme-pair-schema
dev/migrie/b/13388-experiments-1
dev/cazamor/spec/a11y-vt-seq
dev/migrie/b/14557-empty-folder-dropdown
dev/cazamor/spec/a11y-vt-seq-v2
release-1.15
dev/migrie/f/process-model-v3-test-0
dev/lhecker/vsconfig
dev/migrie/s/5000-presentation
dev/lhecker/5907-startup-perf
dev/lhecker/winrt-file-api-benchmark
dev/duhowett/128-bit-compiler
dev/migrie/fhl/more-shell-integration
dev/migrie/b/13388-experiments-0
dev/lhecker/til-to-ulong-improvements
dev/migrie/s/markdown-notebooks
dev/cazamor/a11y/nav-by-page
dev/cazamor/a11y/system-menu-support
dev/duhowett/no-private-registry-keys
dev/cazamor/wpf/uia-expose-enable-events
dev/cazamor/wpf/uia-events
extendAISpec
dev/migrie/fhl/clickSendInput
dev/migrie/fhl/save-command
dev/migrie/b/theme.profile
dev/migrie/b/13943-a-test-for-this
dev/migrie/oop/2/endgame
dev/duhowett/hax/merge_idl
dev/migrie/oop/2/infinity-war
dev/migrie/spellbot-cve
dev/cazamor/a11y-sev3/new-profile-announcement
dev/migrie/fhl/upside-down-mode
release-1.14
dev/migrie/f/9458-startupInfoToTerminal
dev/migrie/fhl/5916-triggers
dev/migrie/b/13523-context-menu
dev/migrie/b/6523-endpaint-outside-lock
dev/migrie/b/12413-OnUnhandledException
dev/lhecker/render-snapshot
dev/cazamor/1.15/scroll-to-point
dev/migrie/mux-2.8-aug-2022
dev/lhecker/lock-console-guard
dev/migrie/f/1504-final
dev/pabhoj/sui_follow_ups
dev/migrie/f/til-winrt.h
dev/cazamor/color-picker-redesign
dev/migrie/fhl/vscode-autocomplete-prototype
dev/migrie/f/1504-prototype
dev/migrie/oop/2/loki
dev/migrie/oop/2/wandavision
dev/migrie/b/8698-YOURE-OUT-OF-ORDER
fabricbot-configuration-migration
dev/migrie/b/12788-did-it-work
dev/migrie/b/localtests-ci-2022
dev/cazamor/1.14/replace-compareInBounds
dev/pabhoj/preview_string
dev/cazamor/ks/switchSelectionEndpoint
dev/migrie/oop/2/COM-ISwapChainProvider-attempt-1
dev/migrie/b/dxd-marker
release-1.13
dev/migrie/b/13066-for-defterm
dev/cazamor/revert-dwm
dev/migrie/b/13066-sw_flash_repeatedly
dev/migrie/b/no-cloaky-cloak
dev/migrie/f/apples-to-oranges
dev/migrie/f/no-custom-caption-btns
dev/migrie/f/10509-mica-and-transparent-titlebars
dev/migrie/b/12911-wpf-focus-fg
dev/migrie/titebar-colors
dev/lhecker/4015-cursor
dev/migrie/fhl/rgb-rainbow-window-frame
dev/migrie/fhl/scroll-marks-prototype
release-1.12
dev/miniksa/compliance
dev/migrie/f/default-icons
dev/migrie/fhl/10175-web-search-for-text
dev/migrie/fhl/menu-complete-prototype
dev/migrie/b/2988-merged-prototypes
dev/migrie/b/2988-niksa-msgs-prototype
dev/migrie/fhl/9583-colorSelection
dev/migrie/b/10609-sui-leak
dev/migrie/b/32-attempt-3
dev/migrie/release-1.12-rejuv-attempt-2
dev/migrie/demo-for-presentation
dev/migrie/b/32-but-im-here-for-12567
dev/duhowett/conpty_first_frame_blug
dev/migrie/b/11092-unfocused-acrylic-settings
dev/migrie/localtests-in-ci
dev/migrie/b/12356-attempt-2
dev/migrie/b/12353-with-null
dev/migrie/b/12387-trim-spaces
dev/migrie/b/5033-bad-start
dev/lhecker/12351-broken-locales
dev/migrie/b/8663-input-to-oem-crash
dev/migrie/b/11743-win10-opacity-is-hard
dev/migrie/f/ctrl-click-elevate
dev/migrie/b/12196-shim-localization
dev/lhecker/issue-4015-til-rect
dev/cazamor/eim/mvvm
dev/migrie/f/--elevate
dev/migrie/b/11668-i-think
dev/migrie/b/11994-wsl-mangline
dev/migrie/eim/3475-action-xmacros
dev/migrie/eim/incremental-build-000
dev/cazamor/a11y/fake-uia-data
dev/migrie/f/non-terminal-content-elevation-warning
dev/migrie/f/632-on-warning-dialog
dev/lhecker/rgba
dev/migrie/b/8480-keybindings-in-tabs
release-1.11
dev/migrie/b/11561-dead-ends
dev/migrie/oct-21-roadmap-update
dev/migrie/fhl/adaptive-card-extension
dev/cazamor/test/11440
dev/migrie/f/warning-dlg-automation
dev/migrie/b/1.12-crash-on-exit
dev/migrie/b/11146-next-tab-in-cmdpal
release-1.10
dev/migrie/5ff9a24-and-75e2b5f
dev/duhowtt/hax/cpal-jumplist-async
dev/lelian/actionid/1
dev/migrie/f/just-elevated-state
dev/lhecker/terminal-settings-cleanup
dev/migrie/gh-10824
dev/pabhoj/cursor_light
dev/migrie/oop/wandavision
dev/migrie/oop/endgame
dev/migrie/oop/infinity-war
dev/lhecker/app-state-actually-hidden
dev/migrie/b/6160-dynamic-default-warning
dev/mgirie/b/more-nchhittest-ideas
dev/migrie/b/9320-interfacial-separation
cinnamon/fhl/find-contextmenu
dev/lhecker/wsl-distro-generator-cleanup
dev/migrie/b/10875-but-more-clever
dev/migrie/b/broken-globalsummon-overloading
dev/duhowett/hax/rle-row
dev/migrie/fhl-2021/cmdpal-select-list
dev/migrie/fhl-2021/differential-pixel-shading
dev/duhowett/hax/no-writable-glyphat
dev/migrie/fhl-2021/more-shader-variables
dev/migrie/titlebar-shenannigans
dev/miniksa/win10_font_matching
dev/lhecker/conhost-oom
dev/migrie/b/10332-less-snappy-scrolling
dev/migrie/b/7422-1px-top-border
release-1.9
dev/cazamor/move-scratch
release-1.8
dev/miniksa/manifest_2
release-1.6
release-1.7
dev/migrie/oop/the-whole-thing
dev/migrie/oop/connection-factory
dev/migrie/f/quake-dropdown-2
dev/miniksa/rle2
dev/migrie/f/quake-toCurrent-experiments-2
dev/migrie/f/quake-toCurrent-experiments
dev/migrie/f/quake-dropdown
dev/cazamor/actions-page/template
dev/duhowett/hax/cursor_stamp_foreground_background
dev/migrie/f/1860-hey-might-was-well-hack-during-a-hackathon
dev/migrie/oop-terminal.control-split-control
dev/duhowett/hax/build-with-wholearchive
dev/cazamor/spec/tsm-actions-temp
dev/migrie/oop-tear-apart-control
dev/migrie/oop-scratch-3
dev/cazamor/sui/bugfix-reload-crash
dev/migrie/f/xmacro
dev/cazamor/sui/proto/profile-nav-view
dev/migrie/f/name-windows
dev/migrie/dol/messing-with-shaders-take-1
release-1.5
dev/cazamor/sui/inheritance-hyperlinks-test
dev/migrie/r/commandline-lib-002
dev/migrie/f/com.fabrikam.toaster
dev/cazamor/adaptive-cards-prototype
dev/migrie/f/commandline-lib
dev/miniksa/zipzoom2
dev/migrie/f/remote-commandlines
dev/migrie/f/632-elevated-profiles
dev/migrie/oop-broker-000
dev/migrie/fix-pr-7015
dev/duhowett/clang
dev/miniksa/input_tests_2
dev/miniksa/input2
dev/migrie/oop-rpc-000
release-1.4
dev/migrie/oop-mixed-elevation-1
dev/migrie/oop-window-content-1
cinnamon/open-json
dev/miniksa/input_tests
dev/duhowett/hax/tsm-graphviz
dev/miniksa/input
dev/duhowett/hax/caption_buttons
release-1.3
dev/cazamor/a11y/expand-line-under-viewport
dev/cazamor/acc/ch/word-nav-perf
dev/cazamor/spec/settings-ui-architecture-draft
dev/duhowett/hax/tap_upgrade
dev/migrie/f/pane-exit-animation
release-1.2
dev/migrie/move-lib-up-and-dll-down
release-1.1
dev/migrie/f/branch-2-backup
dev/migrie/f/settings-getters-only
dev/duhowett/hax/command_palette_search
dev/migrie/f/6856-let-terminalpage-expandcommands
dev/migrie/f/theming-2020
dev/migrie/oop-scratch-4
dev/duhowett/hax/punchout
dev/migrie/s/action-ids
dev/migrie/f/lets-just-generate-these
dev/migrie/oop-scratch-2
dev/miniksa/dcomp
dev/miniksa/gotta_go_fast_spsc
dev/miniksa/gotta_go_fast
dev/miniksa/perf_skip_checks
dev/miniksa/perf_buffer_dig
dev/migrie/s/1203-cursorTextColor
dev/migrie/f/fix-intellisense-i-guess-backup
release-1.0
dev/migrie/f/execute-commandlines
dev/migrie/f/2046-Command-Palette-v2
dev/migrie/b/6421-passthrough-alt
dev/migrie/b/moving-focus-is-hard
dev/miniksa/set
dev/migrie/f/1203-phase-1
dev/migrie/f/get-localtests-in-ci
dev/cazamor/drag-panes
dev/cazamor/tile-background
release-0.11
dev/duhowett/dev/duhowett/hax/appstate_remember
dev/duhowett/hax/wpf_win_8_hax
dev/migrie/b/3088-weird-exact-wrap-resize
release-0.10
dev/migrie/b/4591-custom-scaling-bug
dev/duhowett/hax/attr_smuggling
dev/migrie/b/5161-mingw-vim-fix
dev/miniksa/dx_bitmap
dev/migrie/b/1503-try-messing-with-cooked-read
dev/duhowett/eyebeam
dev/migrie/b/5113-experiments
dev/duhowett/hax-selection-exclusive
dev/migrie/f/more-vt-renderer-tracing
dev/miniksa/bitmap
dev/duhowett/wprp
dev/miniksa/bitmap-mad-with-power
dev/migrie/f/resize-quirk
dev/migrie/f/reflow-buffer-on-resize-002
wpf-renderer-revert
dev/miniksa/draw
release-0.9
dev/miniksa/tabs-color-fix
dev/miniksa/4309
dev/migrie/f/just-wrapping
dev/migrie/b/3490-try-another-resize-algo
release-0.8
dev/migrie/b/3490-a-simpler-resize
dev/migrie/b/3490-resize-down
dev/miniksa/4254
dev/migrie/f/conpty-wrapped-lines-2
dev/migrie/b/be-better-at-hiding
dev/migrie/f/3327-xaml-theming-proto
dev/miniksa/gardening2
release-0.7
dev/duhowett/conpty-flags
dev/migrie/f/603-vintage-opacity
dev/migrie/PR#3181-comments
dev/duhowett/font-64
release-0.5
dev/migrie/b/663-paste-lf-always
dev/migrie/b/2011-reordered-fallthrough-strings
dev/migrie/b/411-init-tab-stops
dev/migrie/b/json-patching-is-hard
dev/migrie/b/2455-try-getting-tests-working
dev/migrie/b/1223-change-256-table
dev/migrie/f/2171-openterm.cmd
dev/migrie/f/drag-panes
dev/migrie/f/2046-command-palette
release-0.3
dev/miniksa/manager
dev/migrie/f/non-terminal-panes
dev/migrie/f/passthrough-2019
dev/miniksa/shared_pch
dev/migrie/f/1897-less-duplicated-work
release-0.2
dev/cazamor/mcs/viewport-selection
dev/duhowett/version_hack
v1.25.1912.0
v1.24.11911.0
v1.25.1322.0
v1.24.11321.0
v1.25.1241.0
v1.25.1171.0
v1.25.923.0
v1.24.10921.0
v1.25.622.0
v1.24.10621.0
v1.24.10212.0
v1.23.20211.0
v1.24.3504.0
v1.23.13503.0
v1.24.2812.0
v1.23.12811.0
v1.24.2682.0
v1.23.12681.0
v1.24.2372.0
v1.23.12371.0
v1.23.12102.0
v1.22.12111.0
v1.23.11752.0
v1.22.11751.0
v1.22.11141.0
v1.23.11132.0
v1.23.10732.0
v1.22.10731.0
v1.21.10351.0
v1.22.10352.0
v1.23.10353.0
v1.22.3232.0
v1.21.3231.0
v1.22.2912.0
v1.21.2911.0
v1.22.2702.0
v1.21.2701.0
v1.22.2362.0
v1.21.2361.0
v1.21.1772.0
v1.20.11781.0
v1.21.1382.0
v1.20.11381.0
v1.21.1272.0
v1.20.11271.0
v1.20.11215.0
v1.19.11213.0
v1.20.10822.0
v1.19.10821.0
v1.20.10572.0
v1.19.10573.0
v1.20.10303.0
v1.19.10302.0
v1.18.10301.0
v1.20.10293.0
v1.19.10292.0
v1.18.10291.0
v1.18.3181.0
v1.19.3172.0
v1.19.2831.0
v1.18.2822.0
v1.19.2682.0
v1.18.2681.0
v1.18.1462.0
v1.17.11461.0
v1.18.1421.0
v1.17.11391.0
v1.17.11043.0
v1.16.10261.0
v1.17.1023
v1.16.10231.0
v1.15.3465.0
v1.16.3463.0
v1.15.2712.0
v1.15.2874.0
v1.16.2641.0
v1.16.2523.0
v1.15.2524.0
v1.15.2282.0
v1.14.2281.0
v1.14.1962.0
v1.15.2002.0
v1.15.2001.0
v1.15.1862.0
v1.14.1861.0
v1.14.1451.0
v1.14.1432.0
v1.13.11431.0
v1.13.10983.0
v1.12.10982.0
v1.13.10733.0
v1.12.10732.0
v1.13.10395.0
v1.12.10393.0
v1.13.10336.0
v1.12.10334.0
v1.12.3472.0
v1.11.3471.0
v1.12.2931.0
v1.12.2922.0
v1.11.2921.0
v1.11.2731.0
v1.10.2714.0
v1.11.2421.0
v1.10.2383.0
v1.10.1933.0
v1.9.1942.0
v1.9.1523.0
v1.8.1521.0
v1.9.1445.0
v1.8.1444.0
v1.8.1092.0
v1.7.1091.0
v1.8.1032.0
v1.7.1033.0
v1.7.572.0
v1.6.10571.0
v1.5.10411.0
v1.6.10412.0
v1.6.10272.0
v1.5.10271.0
v1.5.3242.0
v1.4.3243.0
v1.5.3142.0
v1.4.3141.0
v1.4.2652.0
v1.3.2651.0
v1.3.2382.0
v1.2.2381.0
v1.1.2233.0
v1.2.2234.0
v1.1.2021.0
v1.2.2022.0
v1.1.1812.0
v1.0.1811.0
v1.1.1671.0
v1.0.1401.0
v0.11.1333.0
v0.11.1251.0
v0.11.1191.0
v0.11.1111.0
v0.11.1121.0
v0.10.781.0
v0.10.761.0
v0.9.433.0
v0.8.10261.0
v0.8.10091.0
v0.7.3451.0
v0.7.3382.0
v0.7.3291.0
v0.7.3252.0
v0.6.3181.0
v0.6.2951.0
v0.6.2911.0
v0.5.2762.0
v0.5.2761.0
v0.5.2681.0
v0.5.2661.0
v0.3.2321.0
v0.4.2342.0
v0.4.2382.0
v0.3.2171.0
v0.3.2142.0
v0.2.1831.0
v0.2.1715.0
v0.2.1703.0
v0.1.1621.0
v0.1.1581.0
v0.1.1502.0
v0.1.1431.0
v0.1.1361.0
v0.1.1093.0
v0.1.1161.0
v0.1.1204.0
experiment-master
v0.1.1025.0
experiment-OutsideBuild
broken-tabstops
RS2-final
v0.1.1002.0
experiment-rel-windows-inbox
experiment-f-ServerApp
v0.1.1211.0
1904.29002
1810.02002
1708.14008
Labels
Clear labels
⛺ Reserved
A11yCO
A11yMAS
A11ySev1
A11ySev2
A11ySev3
A11yTTValidated
A11yUsable
A11yVoiceAccess
A11yWCAG
Area-Accessibility
Area-AtlasEngine
Area-AzureShell
Area-Build
Area-Build
Area-Chat
Area-CmdPal
Area-CodeHealth
Area-Commandline
Area-CookedRead
Area-DefApp
Area-Extensibility
Area-Fonts
Area-GroupPolicy
Area-i18n
Area-Input
Area-Interaction
Area-Interop
Area-Localization
Area-Output
Area-Performance
Area-Portable
Area-Quality
Area-Remoting
Area-Rendering
Area-Schema
Area-Server
Area-Settings
Area-SettingsUI
Area-ShellExtension
Area-ShellExtension
Area-ShellExtension
Area-Suggestions
Area-Suggestions
Area-TerminalConnection
Area-TerminalControl
Area-Theming
Area-UserInterface
Area-VT
Area-Windowing
Area-WPFControl
AutoMerge
Blocking-Ingestion
Culprit-Centennial
Culprit-WinUI
Disability-All
Disability-Blind
Disability-LowVision
Disability-Mobility
External-Blocked-WinUI3
Fixed
Gathering-Data
good first issue
HCL-E+D
HCL-WindowsTerminal
Help Wanted
Impact-Compatibility
Impact-Compliance
Impact-Correctness
Impact-Visual
In-PR
InclusionBacklog
InclusionBacklog-Windows TerminalWin32
InclusionCommitted-202206
Issue-Bug
Issue-Docs
Issue-Feature
Issue-Feature
Issue-Question
Issue-Samples
Issue-Scenario
Issue-Task
Needs-Attention
Needs-Author-Feedback
Needs-Bisect
Needs-Discussion
Needs-Repro
Needs-Tag-Fix
Needs-Tag-Fix
Needs-Triage
No-Recent-Activity
Priority-0
Priority-1
Priority-2
Priority-3
Product-Cmd.exe
Product-Colortool
Product-Colortool
Product-Colortool
Product-Conhost
Product-Conpty
Product-Meta
Product-Powershell
Product-Terminal
Product-WSL
pull-request
Resolution-Answered
Resolution-By-Design
Resolution-Duplicate
Resolution-External
Resolution-Fix-Available
Resolution-Fix-Committed
Resolution-No-Repro
Resolution-Won't-Fix
Severity-Blocking
Severity-Crash
Severity-DataLoss
spam
this-will-be-a-breaking-change
Tracking-External
WindowsTerminal_Win32
Work-Item
zAskModeBug
zInbox-Bug
Mirrored from GitHub Pull Request
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: starred/terminal#22232
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @avih on GitHub (Sep 7, 2024).
Windows Terminal version
1.22.240823002-preview
Windows build number
10.0.19045.4780
Other Software
No response
Steps to reproduce
CreateConsoleScreenBufferand then activates it usingSetConsoleActiveScreenBuffer.Test program which: prints 100 lines to the main buffer, then creates and activates a new screen buffer, then writes 40 lines to the new buffer, then activates the original buffer and exits:
scrollbuf.c
Expected Behavior
The original scrollback buffer is restored without traces of content which was printed to the new/secondary console buffer.
Actual Behavior
Lines which were printed to the new (secondary) buffer buf were scrolled out of view become part of the scrollback of the main buffer.
With the test program above (which prints 40 lines to the secondary buffer), if the terminal height is less than 40, for instance 30 lines, then the first 10 lines printed to the secondary buffer will be added to the scrollback of the main buffer.
After the program exits, one needs to scroll up (e.g. using the mouse wheel) to ovserve the lines from the secondary buffer.
Additional notes:
OpenConsole.exeand also no issue in the native win10 conhost (i.e. the main scrollback buffer is unaffected by overflow at the secondary buffer).EDIT:
The issue manifests when using
less.exefor windows in Windows terminal, e.g.less some-file.cand then scrolling down using the down-arrow, then afterlessexits then the scrollback buffer has content which was scrolled out-of-view in less (but no issue in OpenConsole or conhost).@similar-issues-ai[bot] commented on GitHub (Sep 7, 2024):
We've found some similar issues:
If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.
@avih commented on GitHub (Sep 7, 2024):
The bot suggested #17669 might be similar, and it is similar, but not the same: #17669 is about the main buffer polluting the secondary buffer, while this is the other way around.
Also, this issue still exists, while #17669 is presumably already fixed.@lhecker commented on GitHub (Sep 8, 2024):
No matter whether or how we fix it (pages perhaps? but that only works for WT),
lessshould use the alternative screen buffer on Windows on versions that support it.@avih commented on GitHub (Sep 8, 2024):
Now sure what "only works for WT" means. Do you mean it would be fixed for the windows-terminal but not for OpenConsole/conhost?
If yes, then as I noted above, OpenConsole/conhost don't have this issue. It only happens in windows-terminal.
Maybe, but that's work that someone will have to do, and with more code paths which have to be maintained and tested, and while code which uses
CreateConsoleScreenBufferalready exists and not supposed to be broken.(similar *nix code which uses alt-screen does exist in
less, but can't be shared easily with windows code because it uses terminfo db for the sequences etc, and it's also hacky because using alt-screen is not bullet-proof like SGR sequences)I believe the
microtext editor does the same without switching to the alt screen buffer using VT escape sequences, and I'm sure there are many existing application which might not be very actively maintained and which do useCreateConsoleScreenBufferin order to keep the main buffer (and its scrollback) clean of temporary full-screen TUI content.@lhecker commented on GitHub (Sep 8, 2024):
FWIW the
lessshipped by msys2 (e.g. git-for-windows) works correctly, because it uses cygwin and so it uses the alternate screen buffer.I wrote it as a comment targeted to the other maintainers. We received an implementation for VT pages a while ago (#16615). It allows you to have multiple "pages" (= similar to console buffers, but more limited) at the same time, instead of just the two usual ones (main and alt buffer). That would allow us to improve our
CreateConsoleScreenBuffertranslation. However, most terminals don't support these sequences AFAIK and so we cannot always use them. That's what I meant with "only works for WT".To be fair, that's also true for us. But I understand that we should bear the burden here.
However, unlike
less, etc., we cannot make the VT translation perfect. That's something I'll get into more detail below.Similarly, it would be nice if
microcould switch over to using the alt buffer. Windows had support for it for about as long asmicrohas existed.Such existing applications should be translated to VT to the absolute best of our abilities of course. It's not their fault that Windows changed its focus from the old console APIs over to VT sequences over the last decade. However...
...our abilities to do that translation are limited. There are multiple problems:
dwSize) on top of a window size (srWindow). I.e. the application can specify your scrollback size, not you. That's a concept that (mostly?) doesn't exist in the VT world (certainly not outside of VT pages).CSI t(resize window sequence) but that may be ignored by the hosting terminal. That's definitely true for Windows Terminal: we don't want to allow hidden tabs to randomly resize your window. If the resize is ignored, console applications often break, because they don't check if the size actually changed.CSI talso doesn't address the problem that console buffers may have a custom scrollback size.But most importantly:
SetConsoleActiveScreenBufferof a console buffer with existing contents is a lossy operation and some of your screen contents may be permanently lost, because we cannot know what custom VT sequences your favorite terminal supports so we cannot save them either. SinceSetConsoleActiveScreenBufferis used byless(andmicro?) to switch back to the main buffer, this issue will always affect you when using these applications.We're expected to support complex VT, complex Unicode, and complex console APIs simultaneously. But the only thing Windows historically supported was the latter, while the former two are obviously incompatible with that:
CHAR_INFOdoes not support complex VT attributes nor Unicode, buffer read-back doesn't exist in the VT world, andSetConsoleActiveScreenBuffercannot be cleanly translated to any VT. There's a conflict here and the saying "You can't have your cake and eat it too" comes to my mind.The solution appears to introduce a VT sequence that represents
CreateConsoleScreenBufferandSetConsoleActiveScreenBufferperfectly, but then we need to get that new sequence supported by other terminals, including those on Linux (so you can SSH into Windows). At that point the question is: Why should all terminals support the new sequence as opposed to terminal applications not usingReadConsoleOutputandSetConsoleActiveScreenBufferanymore?In any case, we'll always try to do our absolute best, and perhaps we can improve the symptoms of your issue. But I don't believe it's fair to expect us to make two completely conflicting technologies fit perfectly.
@avih commented on GitHub (Sep 8, 2024):
Yeah, I totally understand the main issue and that's console buffer has many features which don't have an equivalent in the unix terminal world, or not enough terminals support enough features to implement many of those in the VT world, so that it can be expected to work fully inside some 3rd part terminal emulator.
That being said, I'd guess one goal of the windows terminal is to provide an environment in which windows console application can behave as if they run in conhost, so I'd think that console screen buffer would need to work somehow, including many/most/all of its features which don't have an equivalent in the VT world.
That may or may not extend to arbitrary conpty clients, but obviously prefably it does extend.
Specifically though, "less" for windows uses the console buffer like alt screen. I.e. it doesn't use a custom size (it does set size, but copies it from the main buffer), and it doesn't do read-back (that I know of, but I think it doesn't), and VT alt-screen also doesn't spill scrolled-out content into the main buffer scrollback, so at least at this specific use case, I don't think it requires features which "normal" alt-screen doesn't have. I.e. I'd think that it could be exposed as normal alt-screen to conpty clients and it would work as expected.
Admittedly I don't know most of the specifics about implementation details with the windows terminal, but I'm now getting the impression that it's a pure VT (conpty) app, probably like other 3rd party windows VT terminals (wezterm, alacritty, etc) and which operates mainly or exclussively using VT sequences?
I understand the issues this approach poses, but also think there's a non-negligible need to support existing console apps which might not get updated to use the VT interface.
Maybe conhost/OpenConsole can identify that a console app uses some features which translate to VT sequences which are not commonly supported by 3rd party terminals, and issue a warning (once-ish per app) that 3rd party terminals might not be compatible with this application (while the windows terminal would support it via extended sequences which emulate the console buffer fully, etc).
It's not my place to suggest solutions here and I'm unaware of the constraints you work with, but I do think that at least the windows terminal should be a good environment for legacy console apps, even if they use features which translate to VT sequences which are not universally supported.
Isn't that right?
@avih commented on GitHub (Sep 15, 2024):
Does this await resolution?
@lhecker commented on GitHub (Sep 16, 2024):
I fully agree with this, which is why I made the following plan: https://github.com/microsoft/terminal/blob/main/doc/specs/%2313000%20-%20In-process%20ConPTY.md
That will need at least another year or so to be done though.
Yep, currently Windows Terminal operates exclusively via VT sequences. The above plan would change this: Windows Terminal would then be a native console server (like good old conhost), while we would still only use pure VT for windows applications run under WSL, as well as SSH and some other tools.
I think that approach has the best trade-off of being relatively easy to implement (by us and others), it's performant and robust. The only downside is that it'll take a while to get there.
@avih commented on GitHub (Sep 16, 2024):
Can't say I entirely or even mostly grok it, but out of curiosity, would that mean that the windows terminal would be a good env for "legacy" console apps, but those same apps would run less good in 3rd party terminal emulators, because those work exclussively via VT sequences, and then some APIs can't be translated well enough (like is the case now with the windows terminal)?
And specifically about this issue, does that mean that it won't be fixed until this transition is complete?
Because:
I'd imagine that console buffer would be implemented/exposed using alt-screen, and as such, the issue shouldn't exist, because content which scrolls out of the alt-screen doesn't normally pollute the main scrollback buffer in any *nix terminal, right?
IOW, I'd think that this specific issue, depending on implementation details, does not actually need this planned architechture change?
@lhecker commented on GitHub (Sep 16, 2024):
No, because over SSH these apps will be broken in Windows Terminal just as before, just like they're broken in conhost right now. Further "no", because the linked proposal can be implemented by any other terminal - it's not a proposal specific to Windows Terminal. And lastly, if we were to introduce a new sequence for translating console screen buffers instead, it would still take years for any other terminal adopt it. Given other precedent, what's most likely is that no other terminal will ever adopt it.
Just to clarify: Implementing the linked spec document above doesn't take a year. It takes maybe 1 month or so. It's just that I also need to work on a lot of other issues as well.
Unfortunately, yes. As I outlined above, "pages" VT sequences aren't supported by other terminals and also don't perfectly map console buffers, so even if we were to use them, someone would likely soon find another bug with them. Custom VT sequences would similarly not be supported by other terminals. Lastly, implementing a solution with VT sequences now will take just as long to implement as implementing the linked proposal above, because Windows Terminal currently doesn't support more than 2 text buffers (outside of VT pages), etc.
I don't want to do any such translations at the moment because they're "risky". Any edge cases around console buffer switching would need to be fixed by me. Since Windows has had supported for the xterm alt buffer for almost a decade now, I think it's instead on these still fully maintained applications to switch over to using the alt buffer.
I would understand it, if this issue was a major one (like a crash), but it's really more of a really annoying edge case, wouldn't you agree? Basically, I just don't want to invest 50% of the time now to get a quick hack in that solves 10% of the problem, when I can also just wait 100% of the time and fix the problem 100%.
Personally, I'm just kind of tired of using software that's a hundred quick hacks glued together under a single trench coat (I'm sure you can imagine a lot of examples, particularly also from Microsoft, perhaps including this very application). For now, I just want to write some quality software. I hope you understand. 🙁
@avih commented on GitHub (Sep 16, 2024):
We're guessing, but my guess would be the same as yours.
I agree. I don't think solving it with custom or uncommon sequences is great.
Well, I was guessing that console buffers are already getting translated to alt-screen, and if that were the case then I thought the issue shouldn't exist already currently, but judging by this statement, that's not the case.
May I ask what happens currently, implementation-wise (but high level), which causes text which scrolls out of a (non-main) screen buffer to reach the terminal's scrollback?
I do agree, but for me it's annoying enough to get back to conhost or openconsole, because I do use "less" a lot, and I do value my scrollback history, but if everytime I use "less" it adds pages of junk to my scrollback, then it will be too annoying.
(or I might implement alt-screen in "less" when VT is supported, because I already contribute to "less", but that's orthogonal to the issue here IMO)
In fact, I already did just that for a long while (using OpenConsole rather than windows terminal), and tried to get back to the terminal recently, and noticed some console buffer issues.
Believe it or not, my main issue with OpenConsole is that shift-mouse-select is unsupported (when quick-edit is disabled, e.g. because the application wants to capture mouse events). Other than that OpenConsole is quite great for me (though I do value the nice features of Windows Terminal too, but for me they're more nice to have than essential, maybe except scrollback search which is very useful).
Shall I open a feature request to support shift-mouse-select in OpenConsole to override disabled-quickedit?
Completely agreed, though many times unavoidable in practice, because such is life. But if you do get the chance to avoid yet another hack, without great cost, I agree you should.
Not doing too bad so far, if I may say so.
@tig commented on GitHub (Sep 22, 2024):
I suspect #17949 is a dupe of this.?
@lhecker commented on GitHub (Sep 23, 2024):
Yeah exactly. As I said, I objectively don't think we should try to map it to the alt-screen as it's somewhat risky to subtly break things. I'd much prefer working on the in-process ConPTY spec linked above (= make Windows Terminal a proper console server), as I consider that a perfect solution.
Since Windows Terminal is currently a pure VT terminal (like on UNIX), it doesn't have "console screen buffers". As a consequence, if you use
SetConsoleActiveScreenBuffer, you never leave Windows Terminal's main screen either. Instead, ConPTY (the Console API --> VT translation layer) writes the new console screen buffer contents straight to the main buffer of Windows Terminal. When you switch back to your original console screen buffer it again writes the original's contents to Windows Terminal's main buffer. This gives the impression as if you had multiple console buffers in Windows Terminal, but in reality, it's ConPTY which turns the contents to pure VT.When you scroll in less it assumes that it's in the alternate screen buffer without scrollback. It then writes more text than fits on the screen when scroll down. But Windows Terminal is not in the alternate screen buffer and so the scrolled off text ends up in the scrollback accidentally.
Similarly, when you change the font size, etc., you zoom the entire contents of Windows Terminal's main buffer including scrollback and that also breaks the illusion.
Please do!
The console API supports reporting shift when mouse input is enabled: https://learn.microsoft.com/en-us/windows/console/mouse-event-record-str
So, to not conflict with that, I think we'll have to check whether
ENABLE_MOUSE_INPUTis set. Otherwise, I think we should be able to support that. 🙂It's not strictly related. 🙂 Let's continue talking about your issue over there.
@avih commented on GitHub (Sep 23, 2024):
Thanks. This indeed explains why this issue happens.
Unfortunately, the case where shift-mouse-select is required for override is exactly when ENABLE_MOUSE_INPUT is set (where the app also disables quick-edit, because otherwise some mouse events don't reach the app), but in windows terminal shift-mouse-select seem to work also in this specific case - which is what I hoped would be possible to do with OpenConsole as well. But this is off topic for this issue. I'll open a feature request (not sure when) and let's see there.
Thanks for the info.
@avih commented on GitHub (Sep 29, 2024):
Other than maybe performance issues, and assuming this is not too hard to do, and that I roughly get the kinds of translations which happen under the hood, would these translations of "scroll in non-main console buffer due to newline at the bottom line, or print when cursor is in bottom-right" work?
(or maybe simply "scroll is about to happen" or "scroll just happened", which are maybe simpler to identify and possibly cover more use cases. those would require minor trivial modifications of the suggested procedures below)
Few suggesitons when such scroll is identified. Do this Instead of printing the char which causes scroll to the VT terminal:
(some of these "print line N" might require clearing the line before print, to remove traces of line N-1 which was in its place previously, or some other solution)
Am I roughly in the ballpark of how these VT translations work and what they're capable of?
Should that work if someone implemented it?
@lhecker commented on GitHub (Sep 30, 2024):
Doesn't
lessenableENABLE_VIRTUAL_TERMINAL_PROCESSING? So, it'd be more like a VT -> VT translation, if anything. We can influence that, but certainly not accurately. For regular console APIs (without VT processing being enabled), we can do almost arbitrary translations, like those you mentioned.@avih commented on GitHub (Sep 30, 2024):
It does, but output which utilizes VT features is not used normally.
By default the console API is used (
SetConsoleTextAttribute,SetConsoleCursorPosition, etc). VT would get used if the internal "VT to Console API translation" layer doesn't identify the escape sequence (and the console supports VT mode), like currently with 256/true colors sequences, or if the user uses a flag to bypass the internal translation and passthrough everything to the console --Da(and it supports VT). But it's still not used for positioning - only for SGR sequences and maybe OSC 8. Other console control don't go through this internal traslation layer. This mixed VT/Console API does work with conhost/openconsole.However, while I initially observed the issue with "less", and it would be nice to get conhost behavior of "less" work correctly also at the Terminal, the goal of this issue was to improve the behavior of the terminal with application which use conhost, and specifically to not pollute the main scrollback buffer when a non-main console screen buffer scrolls content out of view.
Initially you said that it might require missing/uncommon features which most terminals don't support, and we agree it won't be a great solution, but now I suggested a translation which I think should work in all terminals, and which is hopefully not too hard to implement (identify the trigger, translate it accordingly).
Implementation wise, I clearly don't know the details, but I would have guessed that it wouldn't matter (much), because if the non-main screen buffer is about to get scrolled, does it matter whether the trigger was
WriteConsoleor some normal print in VT mode? (of normal text, or whatever). Both end up scrolling the console buffer, and that's the event which should be identified ideally - not the source which caused it. Am I wrong? (at least theoretically, but practical considerations do have a way to make it different than theory...)I get that apps which use mixed Console/VT API may be harder to translate, but let's start with Console API, and hopefully VT input would still mostly work like it does with conhost?
@avih commented on GitHub (Sep 30, 2024):
But you do! mind pointing me to the file[s] where this translation to VT happens? I don't mind giving it a look, maybe I can grasp something (for curiosity).
@lhecker commented on GitHub (Oct 8, 2024):
I also mentioned before that the reason for needing the missing features is because such a translation is excessively difficult. I'll not implement such a translation within the current ConPTY architecture for the aforementioned reasons.
WriteConsolecan be used with VT mode, but I know what you meant. We currently don't do VT -> VT translation at all. Since less uses both console APIs and VT simultaneously, emulating it correctly would require us to parse and translate not just all console APIs but in addition also all VT sequences. This would not just be similar but identical to implementing tmux within ConPTY - a very complex project. There are also no shortcuts when correctness is the goal. Just imagine for instance how sixels would need to be implemented in such a setting. It would take years upon years of my life to sand away on the edge cases that this would cause. I have to outright tell you that I'd not spend time on this myself, even if I was asked to do so at the threat of being fired. That's how much I think this would be a mistake, in the most objective way.The correct approach is the previously mentioned in-process ConPTY. It'll be easier to implement, easier to maintain, and be more correct.
The relevant VT translation functions are here:
4386bf07fd/src/host/VtIo.hpp (L32-L47)You can find the implementation in VtIo.cpp and their usage throughout the project.
@DHowett commented on GitHub (Oct 9, 2024):
Thanks for the lively discussion here! We're not going to be investing in fixing this with VT, but with the new ConPTY architecture. Feel free to continue discussing, but I'm going to close this issue as it's not currently actionable for us.
@lhecker commented on GitHub (Oct 9, 2024):
If it makes it any better, I'm planning to work on the new architecture early next year. This will fix the issue for Windows Terminal under most circumstances. I'll also work on bringing this to other terminals.
@avih commented on GitHub (Oct 25, 2025):
and (posted in 2024):
The issue still exists in current WT 1.23 (didn't yet try 1.24).
Just pinging to ask about progress or status with this new architecture, and about the state of better console buffers support in general.
I don't think it's rare for (legacy) console apps to use screen buffer exactly for this reason (avoiding scroll buffer pollution), but I don't have any meaningful stats either.
Thanks.
@lhecker commented on GitHub (Oct 27, 2025):
I built Microsoft Edit in the meantime instead, if that's worth anything. :)
Now I'm working on this project again, but working on refactors... in this economy? 🫠 We'll have to see when I get to this. 1
Working on said new architecture is neither fun to do, nor do I get rewarded for it. The opposite, rather. We'll have to see... ↩︎
@avih commented on GitHub (Oct 27, 2025):
I know. Very cute. Congrats.
I didn't request a refactor, and I did suggest (vague) alternatives which might not require a refactor. You said it's planned and it might help, and it's been a while, so I wanted to check where it stands, if at all.
Regardless of a refactor, I still argue that console buffers are an important part of the console API, and improving support at conpty is an important step to make the Windows Terminal a more complete user-facing replacement to conhost.
If a refactor or other general solutions to console buffers do not seem likely in the forseeable future, then I suggest again to consider less complex changes which might still improve console buffers with the conpty, maybe specifically with regards to polluting the scrollbuffer, along the lines of my previous suggestions.