Skip to content

2.4.0 Passage link suggestion menu closes at first space typed #1176

@hituro

Description

@hituro

Describe the bug.

When typing a passage link, a suggestion menu appears with matching passage names. However the passage suggestion list closes as soon as a space is typed, either in the passage name or link name.

Steps to reproduce:

  1. Name a passage "Passage Name"
  2. Open a new passage and start typing a link [[Passage, "Passage Name" is suggested
  3. Type a space [[Passage , the hint menu dissapears

Expected behavior:

The hint menu does not dissapear

Additional context on this problem.

I think the problem is the use of extraKeys in:

editor.showHint({
completeSingle: false,
extraKeys:

According to the CodeMirror documentation for showHint, extraKeys causes the list of characters provided (in this case ], -, |) to be appended to the standard CodeMirror key list that closes the hint, which includes white space (/[\s()\[\]{};:>,]/_. Using customKeys instead, replaces the standard list.

I suggest using customKeys instead of extraKeys would fix the issue.

Twine version number

2.4.0

Does this problem occur with the web version of Twine or the desktop app?

Desktop app

What operating system does this problem occur on?

Other

If this problem is occurring with the web version of Twine, what browser does it occur on?

No response

Presubmission checklist

  • I am interested in working on code that would fix this bug. (This is not required to submit a bug report.)
  • I have done a search and believe that an issue does not already exist for this bug in the GitHub repository.
  • I have read and agree to abide by this project's Code of Conduct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3 (could)Annoying bugs that have workarounds, Interesting ideasenhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions