emacs-libvterm icon indicating copy to clipboard operation
emacs-libvterm copied to clipboard

vterm only redrawing on input

Open tazjin opened this issue 3 years ago • 10 comments

Since the last software update I did, vterm only redraws output when it receives more input, or when I perform something that causes Emacs to redraw buffers (e.g. changing the window layout).

Sometimes it does occasional updates on its own, but I am not sure what triggers them.

I've been poking around a bit and haven't found an obvious problem. Curiously, it seems that nothing changed in vterm itself between the set of packages where everything worked and the set where this occurs. I decided to open an issue here anyways in case somebody else has run into this and found a way to resolve it.

In the meantime, I'll attempt to bisect what is going on here.

Note: I use Emacs with native compilation.

tazjin avatar Nov 13 '21 22:11 tazjin

I experience the same symptoms with Emacs 28.1. Did you find something by bisecting, @tazjin? Interestingly enough, I am on NixOS as well.

phaer avatar May 22 '22 15:05 phaer

Nope, never found the source of the issue and at some point after a subsequent update it just stopped v0v

For what it's worth, I'm on nixos-unstable

tazjin avatar May 22 '22 16:05 tazjin

Ah, thanks for the quick response and good to know that there's a chance that it might be fixed in nixos-22.05 (following 21.11 here)

phaer avatar May 22 '22 20:05 phaer

I observe something very similar, that might be related to this issue: I use the Haskell REPL ghci, and each time I press enter, I should see the output of what I just entered, and the prompt of ghci>. Each time, I just see the output, but not the prompt. The prompt appears again when I, like you described, input the up arrow direction (normal input doesn't work), or when I resize the emacs window for example.

I'm using archlinux with its latest emacs, ghc packages, with the latest libvterm

titibandit avatar Jun 03 '22 15:06 titibandit

Like @titibandit, I have a problem with Haskell's GHCi and elm repl not showing prompt or echoing input.

Here is the code that mimics GHCi's line read code, accepting input from the user and outputting it as is. It doesn't show prompt and echo input from the user until a line feed is performed.

import qualified System.Console.Haskeline as H

action :: IO ()
action = do
    H.runInputT H.defaultSettings $ do
        maybeLine <- H.getInputLine "TEST >>> "
        case maybeLine of
          Just line -> H.outputStrLn line
          Nothing -> H.outputStrLn "No Input"

This is the content of ~/.emacs.d/init.el

(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)

(setq exec-path (append exec-path '("/opt/homebrew/bin")))  ; for cmake
(use-package vterm :ensure t)

OS: macOS Monterey(12.4) CPU: Apple M1 emacs: GNU Emacs 28.1

watanany avatar Jun 12 '22 09:06 watanany

I tried using old commits of this repository, and I can't fix the problem this way. It might have something to do with emacs itself.

titibandit avatar Jun 19 '22 20:06 titibandit

I'm experiencing the same issue, also on arch with the latest emacs/libvterm, but I'm also using doom

chaoky avatar Aug 26 '22 23:08 chaoky

Does #617 fix this? #598 has been fixed . if it is not fixed, Could you tell me the step to reproduce your problem with a screenshot

jixiuf avatar Aug 27 '22 02:08 jixiuf

I've updated vterm today, and the issue is fixed for me. I don't know if it's that pull request you mentioned but it's definitely fixed for me. Thanks!

titibandit avatar Sep 07 '22 07:09 titibandit

Same - I can now use ghci inside a vterm :+1:

juhp avatar Oct 25 '22 06:10 juhp