Vim mode: "around" text objects select the wrong pair when the cursor is on the opening delimiter of a second pair on the same line (e.g. ya", `ya``)

Steps to reproduce

  1. Enable Vim mode
  2. Create a new note
  3. Enter insert mode
  4. In the note body, type the following: Quote “A” and quote “B” are on the same line.
  5. Exit insert mode (i.e. to enter normal mode)
  6. Put your cursor on the first double quote for the letter B.
  7. In normal mode, type the following: ya" (yank around the double quotes)
  8. Type $(to move cursor at end of line)
  9. Press p (to paste yanked text)
  10. Observe that the following text is pasted: " and quote "

However, do note that for step (7), had you put your cursor on the first double quote for the letter A, then step 10 would have pasted the correct result, i.e. the text “A”.

Did you read and follow the Troubleshooting Guide ? [Yes/No]

Yes

Expected result

The following text should have been pasted at the end of the line: “B”

Actual result

The following text was pasted at the end of the line: " and quote "

Environment

SYSTEM INFO:
Obsidian version: 1.13.7
Installer version: 1.12.7
Operating system: Darwin Kernel Version 24.3.0: Thu Jan 2 20:24:06 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T8103 24.3.0
Login status: not logged in
Language: en
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

This is not exclusive to quotes; it also happens for other characters, e.g. inline code snippet characters `B`