Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocomplete disappears after typing #4515

Closed
kjgoodrick opened this issue Jan 25, 2020 · 1 comment · Fixed by #4570
Closed

Autocomplete disappears after typing #4515

kjgoodrick opened this issue Jan 25, 2020 · 1 comment · Fixed by #4570

Comments

@kjgoodrick
Copy link

Issue Type: Bug

Describe the bug
Autocomplete dissappears after typing in LaTex begin environments. Works after disabling vim.

To Reproduce
1.) Create basic latex file e.g.:

\documentclass{article}
\begin{document}

\end{document}

2.) Inside document type \begin and press tab to autocomplete begin environment

3.) Type any characters and autocomplete will disappear.

Expected behavior
Autocomplete should stay open and filter suggestions as you type.

Screenshots
Behavior with vim enabled:
vim

Behavior without vim enabled:
no_vim

Extension version: 1.12.4
VS Code version: Code 1.41.1 (26076a4de974ead31f97692a0d32f90d735645c0, 2019-12-18T14:58:56.166Z)
OS version: Windows_NT x64 10.0.18363

System Info
Item Value
CPUs Intel(R) Core(TM) i5-2500K CPU @ 3.30GHz (4 x 3300)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off
surface_control: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 23.95GB (10.48GB free)
Process Argv
Screen Reader no
VM 0%
@cvaldev
Copy link
Contributor

cvaldev commented Jan 28, 2020

This appears to be caused by the multicursor, I see the same behaviour in other languages and it behaves as expected when there is a single cursor.

J-Fields pushed a commit that referenced this issue Mar 27, 2020
Fixes multicursor snippets, and adds support for stuff like auto-bracketing and auto-completion on multicursor mode.

Backspace Support:
Makes range represent the selection at position. This way we delete the correct range rather than the primary selection as it was before these changes.

Multicursor Character Insert:
Makes multicursor text insertion behave like single cursor text insertion by ultimately using the default: type command rather than vscode.TextEditor.insert() which doesn't have support for snippet mode, auto completion, bracketing, etc.

To accomplish this, I've added an optional property (isMultiCursor) to InsertTextVSCodeTransformation which represents vimState.isMultiCursorat the time the transformation was created. This property is used to filter the multicursor transformations into multicursorTextTransformations.

Because the default: type command handles inserting the text into the correct cursor positions there's no need to repeat the transformation multiple times and we can just execute the command once, as long as we know all transformations are trying to do the same thing.

Fixes #4281, fixes #4223, fixes #3005, fixes #4522, fixes #4515, fixes #1946, fixes #3976
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants