randy3k / Terminus

Bring a real terminal to Sublime Text

Home Page:https://packagecontrol.io/packages/Terminus

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vim stop working, getting TypeError (macOS 13.2)

dpslwk opened this issue · comments

Something has changed somewhere in my setup in the last few days that had broken vim inside a terminal
I suspect its something in macOS 13.2 which was just installed, unfortunately I done have a machine still on 13.1 to check

I open a new terminus tab, try vi test and it just hangs
Included error from the sublime console below and attached screen recording
Its only when trying my local (macOS) vi, I can ssh into a linux machine and vi works fine
Happy to help debug as needed and hoping it can be fixed within terminus since this really puts a crimp in my daily work flows

Traceback (most recent call last):
  File "./python3.3/threading.py", line 901, in _bootstrap_inner
  File "./python3.3/threading.py", line 858, in run
  File "/Users/matt/Library/Application Support/Sublime Text/Installed Packages/Terminus.sublime-package/terminus/terminal.py", line 164, in renderer
    feed_data()
  File "/Users/matt/Library/Application Support/Sublime Text/Installed Packages/Terminus.sublime-package/terminus/terminal.py", line 159, in feed_data
    self.stream.feed(data[0])
  File "/Users/matt/Library/Application Support/Sublime Text/Installed Packages/Terminus.sublime-package/terminus/ptty.py", line 796, in feed
    yield_what = send(data[offset:offset + 1])
  File "/Users/matt/Library/Application Support/Sublime Text/Installed Packages/Terminus.sublime-package/terminus/ptty.py", line 737, in _parser_fsm
    csi_dispatch[char](*params, private=True)
TypeError: select_graphic_rendition() got an unexpected keyword argument 'private'
Screen.Recording.2023-01-27.at.06.11.22.mov

Apple silicon
MacOS Venture 13.2
Sublime Text 4143

$ vi --version
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Dec 16 2022 23:29:16)
macOS version - arm64
Included patches: 1-981
Compiled by root@apple.com

Same thing is happening now on my older intel Mac, was fine on macOS 12.5 but update to 12.6.3 and getting same error

https://support.apple.com/en-us/HT213605

Vim
Available for: macOS Ventura
Impact: Multiple issues in Vim
Description: A use after free issue was addressed with improved memory management.
CVE-2022-3705

tracked this down to some change in vim as above related to modifyOtherKeys and xterm XTQMODKEYS,
some error then processing ESC[?4m
and me having set "unix_term": "xterm-256color" in my settings,

if I remove the unix term setting an let it fall back to the default linux vim works again

so seem the vim now in macOS 13.2 is passing ESC[?4m when terminus is in xterm mode but terminus is not able to deal with it

if I remove the unix term setting an let it fall back to the default linux vim works again

Thanks for the tip @dpslwk, it worked for me too.

fea9944 should fit it. Please re-open the issue if it doesn't.

@randy3k Will there be a new release on packagecontrol.io that has this fix?

This fix promptly breaks vim on 12.6.3 :) @randy3k

Disabling "unix_term": "xterm-256color" fixes it back

VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Dec 12 2022 20:03:56)
macOS version - arm64
Included patches: 1-1023
Compiled by root@apple.com
Traceback (most recent call last):
  File "./python3.3/threading.py", line 901, in _bootstrap_inner
  File "./python3.3/threading.py", line 858, in run
  File "/Users/falsefalse/Library/Application Support/Sublime Text 3/Installed Packages/Terminus.sublime-package/terminus/terminal.py", line 164, in renderer
    feed_data()
  File "/Users/falsefalse/Library/Application Support/Sublime Text 3/Installed Packages/Terminus.sublime-package/terminus/terminal.py", line 159, in feed_data
    self.stream.feed(data[0])
  File "/Users/falsefalse/Library/Application Support/Sublime Text 3/Installed Packages/Terminus.sublime-package/terminus/ptty.py", line 796, in feed
    yield_what = send(data[offset:offset + 1])
  File "/Users/falsefalse/Library/Application Support/Sublime Text 3/Installed Packages/Terminus.sublime-package/terminus/ptty.py", line 737, in _parser_fsm
    csi_dispatch[char](*params, private=True)
TypeError: select_graphic_rendition() got an unexpected keyword argument 'private'

Let me publish a new release.