fig icon indicating copy to clipboard operation
fig copied to clipboard

Autocomplete renders in the wrong place

Open admapop opened this issue 3 years ago β€’ 44 comments

Checks

  • [X] I have searched github.com/withfig/fig/issues and there are no duplicates of my issue
  • [X] I have run fig doctor in the affected terminal session
  • [X] I have run fig restart and replicated the issue again

Operating system

macOS 12.3.1 (21E258)

Expected behaviour

When the autocomplete window appears it should be next to what I am typing

Actual behaviour

When the autocomplete window appears it is in a completely different place. Could be on the same screen but far away from where I'm typing, same screen but completely random or even on a completely different screen.

Where I'm typing image

Where it's showing, completely random on a different screen. image

Steps to reproduce

Start up IntelliJ IDEA, open a terminal and start typing.

Environment

fig-details:
  - 2.7.9
hardware-info:
  - model: 
  - model-id: 
  - chip-id: Apple M1 Pro
  - cores: 10
  - mem: 16.00 GB
os-info:
  - macOS 12.3.1 (21E258)
environment:
  - shell: /bin/zsh
  - terminal: intellij
  - cwd: 
  - exe-path: /Users/admapop/.fig/bin/fig
  - install-method: unknown
  - env-vars:
    - FIGTERM_SESSION_ID: b85e4d02-3d2f-4475-862b-979d20b13b79
    - FIG_HOSTNAME: Adrians-MacBook-Pro.local
    - FIG_TERM: 2.7.9
    - PATH: 
    - SHELL: /bin/zsh
    - TERM: xterm-256color
    - FIG_PID: 99906
    - FIG_PARENT: b85e4d02-3d2f-4475-862b-979d20b13b79
    - FIG_SET_PARENT: b85e4d02-3d2f-4475-862b-979d20b13b79

admapop avatar Nov 16 '22 09:11 admapop

Hey @admapop, how did you install the JetBrains IDE you are using? This could be related to #2018.

mschrage avatar Nov 16 '22 16:11 mschrage

Hey @mschrage I installed it via its own .dmg file, didn't use any Toolbox or installer.

One thing I can add is that it happens more often if I switch between fullscreen mode and windowed mode. Wildshot but I'm using magnet for window management.

admapop avatar Nov 17 '22 09:11 admapop

I am encountering this when using Kitty.

richardcase avatar Nov 17 '22 16:11 richardcase

I've also started having this issue on MacOS since the latest update. I have PhpStorm running on one monitor, and when I type in the terminal on that screen the Fig pop sometimes displays in the exact bottom-left corner of my main monitor.

JasonTheAdams avatar Nov 21 '22 20:11 JasonTheAdams

To be clear, for me this is an intermittent issue. I just opened PhpStorm back up and the popup is in the correct place. I didn't update anything. I just opened it back up for work today; it wasn't working yesterday, it is today. Gotta love these kinds of bugs. πŸ˜…

JasonTheAdams avatar Nov 22 '22 18:11 JasonTheAdams

Having the same issue with fig 2.9.0, macOS 13.0.1 (22A400). Started happening after I installed Rectangle, which is similar to @admapop's Magnet.

Specifically, it happens only on my secondary monitor, not the main (laptop) one. Intellij installed from Toolbox, but that hasn't been an issue for me previously.

onkr0d avatar Dec 07 '22 03:12 onkr0d

πŸ‘‹ Another Kitty user here experiencing the same issue.

tomhendra avatar Dec 13 '22 12:12 tomhendra

I'm no longer working at Fig, maybe @grant0417 can take a look

squili avatar Dec 13 '22 12:12 squili

This should be resolved now in Fig 2.10, let me know if you continue to have any issues!

grant0417 avatar Dec 14 '22 19:12 grant0417

Nope, the issue still persists. It is probably related to #2109.

onkr0d avatar Dec 15 '22 03:12 onkr0d

Can you make sure to restart both Fig and intellij

grant0417 avatar Dec 15 '22 03:12 grant0417

The issue persists with Fig v2.10.1 when using Kitty, after restarting both.

tomhendra avatar Dec 15 '22 09:12 tomhendra

This should be resolved now in Fig 2.10, let me know if you continue to have any issues!

I'm still getting this issue in kitty with 2.10.1

richardcase avatar Dec 15 '22 09:12 richardcase

Did not realize this was an issue on Kitty, thought it was only Jetbrains.

If you are having this issue with Kitty can you share the output of the following:

  • kitty --version
  • echo $__CFBundleIdentifier
  • fig debug input-method

grant0417 avatar Dec 15 '22 17:12 grant0417

~ 
❯ kitty --version           
kitty 0.26.5 created by Kovid Goyal
~ 
❯ echo $__CFBundleIdentifier
net.kovidgoyal.kitty
~ 
❯ fig debug input-method
Installed? true
TISInputSource {
    bundle_id: Some(
        "io.fig.cursor",
    ),
    input_source_id: Some(
        "io.fig.cursor",
    ),
    input_source_category: Some(
        "TISCategoryPaletteInputSource",
    ),
    input_source_is_enabled: Some(
        true,
    ),
    input_source_is_selected: Some(
        true,
    ),
    localized_name: Some(
        "FigInputMethod",
    ),
    input_mode_id: None,
    category_keyboard: None,
}
~ 

tomhendra avatar Dec 17 '22 10:12 tomhendra

Hey @tomhendra can you also run fig doctor --verbose

grant0417 avatar Dec 19 '22 20:12 grant0417

Sure can, @grant0417. Here you go.

Let's check if you're logged in... βœ” Logged into Fig

Let's check your dotfiles... βœ” ~/.bashrc contains valid fig hooks βœ” ~/.profile contains valid fig hooks βœ” ~/.zshrc contains valid fig hooks βœ” ~/.zprofile contains valid fig hooks

Let's make sure Fig is setup correctly... βœ” Fig bin exists βœ” PATH contains ~/.local/bin βœ” PATH contains ~/.fig/bin βœ” Settings Corruption βœ” State Corruption βœ” Fig Integration βœ” SSH integration

Let's make sure Fig is running... βœ” Fig is running βœ” Fig socket exists βœ” Daemon ✘ Daemon diagnostics: Daemon websocket error Fig error:

Error
Cannot GET /authenticate/ticket
(status: 404 Not Found)

Let's see if Fig is in a working state... βœ” Figterm βœ” Insertion lock does not exist βœ” Autocomplete dev mode βœ” Plugin dev mode βœ” Dashboard is loading from the correct URL βœ” Autocomplete is loading from the correct URL

Let's check if your system is compatible... βœ” OS is supported βœ” Fish is up to date βœ” Jetbrains Toolbox Check

Let's check fig diagnostic... βœ” Compatible shell βœ” Fig app installed in the right place βœ” Autocomplete is enabled βœ” Fig CLI path βœ” Accessibility enabled

Let's check your terminal integrations... βœ” Terminal support βœ” Input Method

tomhendra avatar Dec 19 '22 20:12 tomhendra

@tomhendra can you share a screen recording of the behavior? To confirm, the autocomplete window appears with the correct suggestions but it is simply located in the wrong place on the screen?

Does Fig autocomplete work as expected in other terminals, like iTerm or the native terminal app?

mschrage avatar Dec 20 '22 03:12 mschrage

@mschrage the autocomplete window appears on my MBP screen, while the Kitty window I am using is on an external display. I have supplied two separate screen recordings as I can't seem to find a way to record both screens at the same time.

https://user-images.githubusercontent.com/32566274/208620118-1b48ccb2-6ab7-4be9-83a7-62538db1738d.mp4

It seems that the native terminal and iTerm2 work as expected.

https://user-images.githubusercontent.com/32566274/208620276-3e8707aa-e771-40d4-9c1b-3745e6cb99ac.mp4

Hope this helps.

tomhendra avatar Dec 20 '22 08:12 tomhendra

That does help, seems that kitty might be reporting the coordinates relative to the local screen, could you try alacritty to see if it works in a similar manor?

@mschrage is this an error with our IME logic or kitty?

grant0417 avatar Dec 20 '22 16:12 grant0417

@grant0417 I can confirm the issue is present with alacritty.

tomhendra avatar Dec 20 '22 17:12 tomhendra

This could definitely be an issue with the IME (or how we process the cursor coordinates reported by the IME). If this is the case, it would explain the JetBrains bug reports as well.

I don't have a monitor that I can use to test this right now, but perhaps @chaynabors can try to reproduce in the office,

mschrage avatar Dec 20 '22 17:12 mschrage

This issue has been automatically closed because there has been no activity for 14 days.

github-actions[bot] avatar Dec 28 '22 20:12 github-actions[bot]

Did you good folks manage to get any further with the Kitty issue? β€”Sorry to be a pest!

tomhendra avatar Dec 29 '22 08:12 tomhendra

Do you use an external monitor/secondary @tomhendra? That might have been an issue with kitty.

grant0417 avatar Dec 30 '22 17:12 grant0417

Thanks for reopening this @grant0417. Yes that is exactly the problem I haveβ€”with the secondary monitor.

tomhendra avatar Dec 30 '22 17:12 tomhendra

This issue has been automatically closed because there has been no activity for 14 days.

github-actions[bot] avatar Dec 30 '22 18:12 github-actions[bot]

@tomhendra that should be resolved in 2.11 which will be release in a week or two.

grant0417 avatar Dec 30 '22 18:12 grant0417

2.11 is live, please let me know if this version resolves your issues

grant0417 avatar Jan 09 '23 21:01 grant0417

Hi @grant0417 - i have upgraded to 2.11 and i'm still encountering the issue with kitty.

richardcase avatar Jan 10 '23 13:01 richardcase