akermu / emacs-libvterm

Emacs libvterm integration
GNU General Public License v3.0
1.69k stars 135 forks source link

Strange line wrapping behaviour on windows less than 80 columns wide #572

Open christopher-dG opened 2 years ago

christopher-dG commented 2 years ago

When I write a long command or print some output that goes paste the edge of the window, the line wrapping behaviour is strange: it overflows until column 80, and then it wraps.

Example:

output-2022-01-20-09:47:46

You can see the first output with a 70-character width has the wrapping issue, but it goes away when I widen the window to 82 characters.

I've minimized my config to this (it happens without the screencast and keycast packages too):

(require 'package)
(setq package-archives
      '(("gnu" . "https://elpa.gnu.org/packages/")
        ("melpa" . "https://melpa.org/packages/")))
(unless (package-installed-p 'use-package)
  (package-refresh-contents)
  (package-install 'use-package))
(require 'use-package)
(setq use-package-always-ensure t)
(use-package gif-screencast
        :custom
        gif-screencast-args '("-x")
        gif-screencast-cropping-program "mogrify"
        gif-screencast-capture-format "ppm")
(use-package keycast)
(keycast-mode)
(use-package vterm)
(column-number-mode)
jixiuf commented 2 years ago

https://github.com/akermu/emacs-libvterm/blob/a940dd2ee8a82684860e320c0f6d5e15d31d916f/vterm.el#L202

christopher-dG commented 2 years ago

Lowering that fixed it, thank you!

Its actual behaviour is a bit puzzling to me though; it the minimum width was 80, then why was vterm allowed to run in windows of less width than that? It seems like something that should be documented a bit further.