fix(editor): follow live terminal size in external editor #153
Open
jabber.developer2
wants to merge 1 commits from
fix/editor-terminal-size into master
pull from: fix/editor-terminal-size
merge into: devs:master
devs:master
devs:feat/ai-api-type
devs:ci/docker-hub-publishing
devs:feat/disco-ac
devs:feat/privacy-enhancements
devs:fix/clientid-regression
devs:fix/ai-chat-completions-followup
devs:feat/ai-custom
devs:fix/unencrypted-send
devs:rollback/pre-upstream-merge
devs:fix/autoping-warning-null-domain
devs:fix/pad-dead-space-reclaim
devs:feat/autoping-warning
devs:chore/untrack-gitversion
devs:fix/multiline-pad-clip
devs:fix/issue-112-followups
devs:fix/issue-128-migrate-v3-dedup
devs:fix/delay-timestamp-validation
devs:ref/light-cleanup
devs:fix/history-scroll-pad-redraw-storm
devs:fix/plugin-post-display-incoming-only
devs:merge/upstream-full
devs:merge-improve
devs:chore/remove-chatlog-stage-1
devs:fix/ai-json-encoding
devs:feat/no-db-backlog-114
devs:fix/scroll-non-chat-windows
devs:fix/paged-non-chat-windows
devs:fix/ai-leaks
devs:feat/ai
devs:fix/ai-followups
devs:test/ai-coverage-unit-only
devs:test/ai-coverage
devs:refactor/scroll-mechanism
devs:fix/verify-per-contact-context
devs:feat/no-db-mode
devs:feat/ai-json
devs:feat/pikaur-parity-arch
devs:fix-pikaur-build
devs:feat/upstream-sync
devs:feat/functest-speedup
devs:fix/cwe-134-format-string-audit
devs:ci/separate-build-step
devs:test/autoping-functional-tests
devs:test/db-functional-tests
devs:fix/arch-build
devs:fix/xep-0030-disco-items-error-handling
devs:fix/xep-0030-empty-disco-items
devs:playground/fix/src_refactoring
devs:tests/disco
devs:fix/test-CI-stability
devs:feat/parallel-tests-clean
devs:feat/parallel-functional-tests
devs:fix/functional_tests_v2
devs:fix/functional_tests
devs:fix/connect_max_args
devs:feat/extended_debug_info
devs:playground/fix/scroll-stuck
devs:build/multicore
devs:build/reenable-fedora
devs:build/autoupdate
1 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
1ac58222b8
|
fix(editor): follow live terminal size in external editor
All checks were successful
CI Code / Check spelling (pull_request) Successful in 14s
CI Code / Check coding style (pull_request) Successful in 23s
CI Code / Code Coverage (pull_request) Successful in 3m26s
CI Code / Linux (debian) (pull_request) Successful in 5m19s
CI Code / Linux (ubuntu) (pull_request) Successful in 5m23s
CI Code / Linux (arch) (pull_request) Successful in 7m17s
The compose editor is spawned via fork+execvp and inherits profanity's LINES/COLUMNS, which hold the size captured at startup and are never refreshed on resize. A curses editor (nano, vim, ...) honors them over the real window, so it renders at the launch-time size after a resize. Drop LINES/COLUMNS from the child's environment before forking so its curses falls back to ioctl(TIOCGWINSZ). Assembling the env in the parent lets the child only reassign environ instead of calling unsetenv() between fork and exec, keeping it clear of unsetenv()'s allocator work in the multithreaded fork->exec window. profanity itself is unaffected. |