Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

[fn param hints] Cannot invoke param hints with Ctrl-Shift-Space after dismissing it with Esc key. #4671

Closed
RaymondLim opened this issue Aug 6, 2013 · 7 comments
Assignees

Comments

@RaymondLim
Copy link
Contributor

  1. Type "some string". and select charAt from code hints.
  2. Hit Esc to dismiss the param hints.
  3. Press Ctrl-Shift-Space.

Result: Nothing happens. If you try again after deleting the open paren with backspace and typing it, then you get the param hints.

@ghost ghost assigned dloverin Aug 6, 2013
@RaymondLim
Copy link
Contributor Author

Not just dismissing with Esc key, scrolling in the editor also dismisses the param hints. After that you can't bring it back with the shortcut.

@dloverin
Copy link

dloverin commented Aug 7, 2013

I've always found the shortcut to be intermittent. I was hoping your fix had solved the problem.

From: Raymond Lim <notifications@gitpro.ttaallkk.topmailto:notifications@github.com>
Reply-To: adobe/brackets <reply@reply.gitpro.ttaallkk.topmailto:reply@reply.github.com>
Date: Wednesday, August 7, 2013 3:20 PM
To: adobe/brackets <brackets@noreply.gitpro.ttaallkk.topmailto:brackets@noreply.github.com>
Cc: Darrell Loverin <dloverin@adobe.commailto:dloverin@adobe.com>
Subject: Re: [brackets] [fn param hints] Cannot invoke param hints with Ctrl-Shift-Space after dismissing it with Esc key. (#4671)

Not just dismissing with Esc key, scrolling in the editor also dismiss the param hints. After that you can't bring it back with the shortcut.


Reply to this email directly or view it on GitHubhttps://github.com//issues/4671#issuecomment-22276532.

@RaymondLim
Copy link
Contributor Author

I thought my changes also fix this, but it seems like we have something else (besides the Shift key in the shortcut) is causing param hints not to show up. You can try it out with flipping the two shortcuts -- assign Ctrl-Space to param hints and Ctrl-Shift-Space to normal JS hints -- and you will still see this issue with Ctrl-Space shortcut. I suspect some logic in JSHints.prototype.needNewHints is causing it, maybe cachedCursor or cachedHints.

@RaymondLim
Copy link
Contributor Author

It is more reliable to invoke param hints on Mac with that shortcut, but it sometimes shows <no parameter> with my example.

@dloverin
Copy link

dloverin commented Aug 9, 2013

Here is what I'm seeing on the Mac.

  1. Start up app. Shift-Ctrl-Space is working fine.
  2. Start up Debugger with Option-Cmd-i. Shift-Ctrl-Space stops working.
  3. Set breakpoint in executeCommand(), in ShellAPI.js. It gets hit for Ctrl-Space but not Shift-Control-Space.

@RaymondLim
Copy link
Contributor Author

Update: The issue depends on where you type 'a'.charAt(. If I type it in an empty js file, the param hint consistently shows up (at least on mac). If I type it in an existing file (eg. on line 520 of CodeHintsManager.js), I don't see the charAt hint until I finished typing 'a'.charA. If I select the hint (in italic style), then it gets inserted without the parentheses. Then if I type open paren and invoke param hint with Ctrl+Shift+Space, it works only for the first time. After that, you can't invoke it any more.

@RaymondLim
Copy link
Contributor Author

Fixed by @dloverin in pull request #4637.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants