trestletech / shinyAce

Integrating the Ace editor with Shiny.
http://trestletech.github.io/shinyAce/
Other
217 stars 54 forks source link

Autocompletion: R code completition not called when Ctrl-Space is pressed twice #41

Closed skranz closed 8 years ago

skranz commented 8 years ago

Hi,

thanks @saurfang for adding the code completion ability. I would like to propose a small improvement. Currently, R based code completion like the rlangCompleter is not called when the user presses Ctrl-Space twice with the same line. That is because shiny does not call the observer as the value of the shiny input for code completion has not change. To fix this I have proposed a pull request that simple adds a random nonce in the call to Shiny.onInputChange('shinyAce_' + inputId + '_hint', { in the rlangCompleter.

skranz commented 8 years ago

I tested it and it works fine in my examples and in the provided autcomplete example

https://github.com/trestletech/shinyAce/tree/master/inst/examples/06-autocomplete

trestletech commented 8 years ago

Closed by #42