microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.51k stars 29.39k forks source link

Auto-close quotes do not work on MacOS with 'US International - PC' keyboard layout #163758

Closed rafaelbeckel closed 2 years ago

rafaelbeckel commented 2 years ago

Type: Bug

Does this issue occur when all extensions are disabled?: Yes Does this issue occur in VS Code Insiders version?: Yes Does this issue occur in Intel-based macs?: No

Since I got the latest version two days ago, 1.72.2, the auto-close quotes feature has stopped working as expected on my home computer, an Apple Silicon Macbook Air.

The feature works in my work computer, an Intel-based Mac with the same VSCode version and the same extensions + configurations synced up. It also works for all other auto-closing tags (parentheses, brackets, and braces). The issue only happens with quotes and double quotes.

When I select a word and type a quote, I expect it to be surrounded by quotes.

However, the word gets deleted, and I see only a single quote.

Something is clearly overriding it: when I hit Cmd+Z, it executes the undo operation, and the single quote is replaced by the expected result, the word between two quotes.

When I undo it again, I see a single quote again. When I undo it for the third time, the word returns to its original state. It takes three undo operations to get back to the original.

VS Code version: Code 1.72.2 (Universal) (d045a5eda657f4d7b676dedbfa7aab8207f8a075, 2022-10-12T22:16:30.254Z) OS version: Darwin arm64 21.5.0 Modes: Sandboxed: No

System Info |Item|Value| |---|---| |CPUs|Apple M1 (8 x 24)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|4, 3, 3| |Memory (System)|8.00GB (0.13GB free)| |Process Argv|--crash-reporter-id b76c6338-1bfe-4e95-91f2-498ba11ce0ad| |Screen Reader|no| |VM|0%|
Extensions (171) Extension|Author (truncated)|Version ---|---|--- language-x86-64-assembly|13x|3.0.0 vscode-openapi|42C|4.14.1 calculate|aca|2.1.0 include-autocomplete|ajs|0.0.4 hugofy|akm|0.1.1 cucumberautocomplete|ale|2.15.2 vscode-tlaplus|aly|1.5.4 cpp-helper|ami|0.3.1 vscode-usda-syntax|ani|0.2.0 svelte-intellisense|ard|0.7.1 nestjs|ash|1.4.2 All-Autocomplete|Ati|0.0.23 tailwind-docs|aus|2.0.0 code-gnu-global|aus|0.2.2 markdown-image-size|bie|0.0.4 vscode-raml|blz|3.0.1 vscode-intelephense-client|bme|1.8.2 ue4-intellisense-fixes|boo|2.0.0 tailwindshades|bou|0.0.5 vscode-tailwindcss|bra|0.8.7 language-hugo-vscode|bud|1.3.1 better-toml|bun|0.3.2 vscode-pytest|Cam|0.1.1 gltf-vscode|ces|2.3.16 npm-intellisense|chr|1.4.2 glsl-canvas|cir|0.2.15 gitignore|cod|0.9.0 doxdocgen|csc|1.4.0 macros|ctf|0.0.4 arm|dan|1.7.4 vscode-eslint|dba|2.2.6 opencv-intellisense|did|0.0.4 python-environment-manager|don|1.0.4 python-extension-pack|don|1.7.0 xml|Dot|2.5.1 vscode-glsllint|dto|1.8.0 gitlens|eam|12.2.2 prettier-vscode|esb|9.9.0 vscode-firefox-debug|fir|2.9.8 vscode-svelte-snippets|fiv|0.5.0 auto-close-tag|for|0.5.14 shell-format|fox|7.2.2 kotlin|fwc|0.2.26 godot-tools|gee|1.3.1 copilot|Git|1.53.7011 vscode-pull-request-github|Git|0.50.0 go|gol|0.35.2 terraform|has|2.24.3 haxe-hl|Hax|1.3.4 vscode-test-explorer|hbe|2.21.1 randomeverything|hel|0.0.3 svgeditor|hen|2.9.0 php-cs-fixer|hig|1.2.7 output-colorizer|IBM|0.1.2 easy-snippet|inu|0.6.3 monkey-patch|ioc|0.1.23 pytest-snippets|jai|1.0.0 plantuml|jeb|2.17.4 better-cpp-syntax|jef|1.16.1 php-cs-fixer|jun|0.3.7 vsc-python-indent|Kev|1.18.0 vscode-gutter-preview|kis|0.30.0 spectrogram|lan|2.0.0 nodejs-repl|los|0.5.15 languague-renpy|Luq|2.0.13 MagicPython|mag|1.1.0 vscode-catch2-test-adapter|mat|4.3.1 rainbow-csv|mec|3.2.0 php-namespace-resolver|Meh|1.1.9 git-graph|mhu|1.30.0 dotenv|mik|1.0.1 file-downloader|min|1.0.12 mindaro|min|1.0.120220915 goto-next-previous-member|mis|0.0.6 vscode-clang|mit|0.2.4 mongodb-vscode|mon|0.9.3 vscode-docker|ms-|1.22.1 csharp|ms-|1.25.0 vscode-aks-tools|ms-|1.3.4 vscode-kubernetes-tools|ms-|1.3.10 python|ms-|2022.16.1 vscode-pylance|ms-|2022.10.20 jupyter|ms-|2022.9.1202862440 jupyter-keymap|ms-|1.0.0 jupyter-renderers|ms-|1.0.10 vscode-jupyter-cell-tags|ms-|0.1.6 vscode-jupyter-slideshow|ms-|0.1.5 remote-containers|ms-|0.255.3 remote-ssh|ms-|0.90.1 remote-ssh-edit|ms-|0.84.0 remote-wsl|ms-|0.72.0 azure-account|ms-|0.11.2 cpptools|ms-|1.12.4 cpptools-extension-pack|ms-|1.3.0 live-server|ms-|0.4.3 makefile-tools|ms-|0.6.0 mono-debug|ms-|0.16.3 sublime-keybindings|ms-|4.0.10 test-adapter-converter|ms-|0.1.6 vsliveshare|ms-|1.0.5735 vsliveshare-audio|ms-|0.1.91 sqltools|mtx|0.25.1 sqltools-driver-mysql|mtx|0.4.0 sqltools-driver-pg|mtx|0.3.0 sqltools-driver-sqlite|mtx|0.4.0 vshaxe|nad|2.25.0 color-highlight|nau|2.5.0 php-docblocker|nei|2.7.0 vs-sequential-number|nep|1.1.0 gremlins|nho|0.26.0 autodocstring|njp|0.6.1 clang-tidy|not|0.5.1 vscode-extension-auto-import|Nuc|1.4.3 vetur|oct|0.36.0 lime-vscode-extension|ope|1.4.3 unreal-engine-4-helper|ope|0.3.2 explorer-exclude|Pet|1.3.2 vscode-concourse|Piv|1.39.0 tsimporter|pmn|2.0.1 polacode|pnp|0.3.4 quicktype|qui|12.0.46 webgl-glsl-editor|rac|1.3.3 subtle-brackets|raf|3.0.0 vscode-data-preview|Ran|2.3.0 vscode-thunder-client|ran|1.20.0 typescript-hero|rbb|3.0.0 java|red|1.11.0 vscode-xml|red|0.21.2022062916 vscode-yaml|red|1.10.1 LiveServer|rit|5.7.9 inline-parameters-extended|Rob|1.2.5 color-manager|roy|0.7.5 rust-analyzer|rus|0.3.1238 partial-diff|ryu|1.4.3 vscode-open|san|0.1.0 crates|ser|0.5.10 markdown-preview-enhanced|shd|0.6.3 shader|sle|1.1.5 numbermonger|sof|0.5.0 shader-toy|ste|0.10.15 rewrap|stk|1.16.3 wav-preview|suk|2.0.4 pretty-json|sup|0.0.4 sleeping-forest-ue4|suv|0.6.14 svelte-vscode|sve|106.2.0 control-snippets|svi|1.9.1 rust-pack|Swe|0.3.3 pdf|tom|1.2.0 python-extended-snippets|tus|0.0.1 sort-lines|Tyr|1.9.1 intellicode-api-usage-examples|Vis|0.2.5 vscodeintellicode|Vis|1.2.28 vscode-java-debug|vsc|0.45.0 vscode-java-dependency|vsc|0.21.0 vscode-java-pack|vsc|0.25.3 vscode-java-test|vsc|0.37.1 vscode-maven|vsc|0.39.0 vscode-spring-initializr|vsc|0.11.0 haxe-debug|vsh|1.2.3 haxe-extension-pack|vsh|1.3.0 hxcpp-debugger|vsh|1.2.4 codetour|vsl|0.0.58 gistfs|vsl|0.4.1 volar|Vue|1.0.8 jinja|who|0.0.8 codedox|wig|1.3.3 clang-format|xav|1.9.0 php-debug|xde|1.29.0 php-pack|xde|1.0.3 go-snippets|zsh|0.0.4 vscode-proto3|zxh|0.5.5 (4 theme extensions excluded)
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492:30256859 vstes627:30244334 vslsvsres303:30308271 pythonvspyl392:30443607 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263cf:30335440 vscoreces:30445986 pythondataviewer:30285071 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593cf:30376535 pythonvs932:30410667 cppdebug:30492333 vsclangdf:30486550 c4g48928:30535728 dsvsc012cf:30540253 azure-dev_surveyone:30548225 2144e591:30553903 pyindex848cf:30577861 nodejswelcome1:30587005 40g7c324:30573242 ```
rafaelbeckel commented 2 years ago

I have new info.

The issue happens when I select the "US International - PC" keyboard layout. It works with the regular "US" keyboard layout.

alexdima commented 2 years ago

@rafaelbeckel This works as expected for me. Not sure if you're aware, `, 'and " are special under the US Intl keyboard layout and act as "dead" keys, used to create accented letters on US Intl. To insert a ' you need to press ' and <space>:

https://user-images.githubusercontent.com/5047891/197353136-40be5db0-e5fb-48b4-ab5b-4f267eac6b37.mp4

YinanZhaoXometry commented 2 years ago

mine 'auto insert closing quotes' not working only in markdown file, even in https://vscode.dev/, please take a look:

image

with no extra settings:

image

with no extension installed:

image
alexdima commented 2 years ago

@onezhaoyn What OS and browser are you using?

vscodenpa commented 2 years ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!