-
Notifications
You must be signed in to change notification settings - Fork 34.6k
Description
Version: 1.37.0
Commit: 036a6b1
Date: 2019-08-08T01:24:14.598Z
Electron: 4.2.7
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Linux x64 5.2.7-100.fc29.x86_64
Steps to Reproduce:
- Create a new Java file.
- Write a basic main function.
- Inside the main function, start typing 'main' and use autocomplete to expand it to
main(args)
. - Type in an argument, then type in a closing parenthesis.
- Instead of the expected behavior of swallowing the last parenthesis, an extra parenthesis will be inserted.
Does this issue occur when all extensions are disabled?: No, because the default autocomplete does not understand function calls without the use of an extension, and therefore does not insert any parentheses. See above following comment about the Javascript extension.
The incorrect behavior is exhibited with any extension that provides autocomplete which inserts parentheses when autocompleting a function call. For example, I also tested this bug on Rust and Javascript code, using their respective extensions. The bug shows up with Rust but not with Javascript, because the latter requires the user to type the parentheses themselves, which correctly trigger parenthesis swallowing.
Behavior in Java:
(Same problem with Rust.)
Behavior in Javascript:
(This behavior is also displayed when extensions are disabled, as the basic autocomplete does not insert parentheses, similar to the Javascript autocomplete.)