withfig / fig

Public issue tracker for Fig.
https://fig.io
MIT License
2.05k stars 63 forks source link

Autocomplete Action (right arrow key) does not hide FIG after completing auto-complete. #313

Closed mikebronner closed 2 years ago

mikebronner commented 3 years ago

Sanity checks

Issue Details

Summary

When using an auto-complete feature in the shell (like zsh-autosuggestions), the FIG menu is still visible after completing the auto-complete action (like by pressing right-arrow). This causes problems when hitting ENTER to execute the command, and instead FIG attempts to do the autocompletion and messes up the command.

Expected Results

After manually completing the auto-complete, FIG menu should close.

Environment

VSCode on Ubuntu 20.04 using RemoteSSH plugin, ZSH as shell, with zsh-autocomplete plugin.

More Detail

terminal::VSCode

Is this issue related to the docs?

Anything else?

No response

mschrage commented 3 years ago

Hey @mikebronner! Can you run fig diagnostic and share the output with me?

mikebronner commented 3 years ago

Hi @mschrage ! Thanks for the response, here's my output:

Version 1.0.46 (B250) [U.S.] 
UserShell: /bin/zsh
Bundle path: /Applications/Fig.app
Autocomplete: true
Settings.json: true
CLI installed: true
CLI tool path: /Users/mike/.fig/bin/fig
Accessibility: true
Number of specs: 147
SSH Integration: true
Tmux Integration: true
Keybindings path: /Users/mike/.fig/user/keybindings
iTerm Integration: false 
Hyper Integration: false
VSCode Integration: true
Docker Integration: false
Symlinked dotfiles: false
Only insert on tab: false
Installation Script: true
PseudoTerminal Path: /opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/Applications/Little
SecureKeyboardInput: false
SecureKeyboardProcess: <none>
Current active process: /bin/zsh (67128) - ttys008
Current working directory: /Users/mike
Current window identifier: 25367/% (com.apple.Terminal)
PATH: /opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/Applications/Little Snitch.app/Contents/Components:/Library/Apple/usr/bin:/Users/mike/.fig/bin
FIG_INTEGRATION_VERSION: 4
mschrage commented 3 years ago

Hey @mikebronner! This seems like an issue with how Fig determines the current editbuffer. It seems like accepting a zsh-autosuggest is not reflected in Fig's editbuffer.

I'll investigate a fix for this!

mschrage commented 2 years ago

This is certainly fixed as of the latest version.