mindforger
mindforger copied to clipboard
[Bug] Cannot link-complete notes that start with digits
Bug description: Many of my research notes start with year such as "2011 - Johnson et al". Using the ctrl-/ for link completion does not bring up the list of notes. Only non-numeric text will pop up a link completion list.
Expected behaviour: Start typing "20" and press ctrl-/ to see any and all notes starting with years text "2000 - ..." to "2022 - ...."
Environment: Windows 10 desktop
- MindForger version: 1.54.0
- Operating system: Windows 10
- Git SHA (in case of nightly/custom build): ...
**Steps to reproduce :
- Create notes - "2010 - Adams" and "2011 - Johnson"
- Start a new note and while in the editor typing "2" or "20" press ctrl-/
Screenshots: N/A
Error message or log: N/A
Looks like the last line pasted here is the problem code in getCompletionPrefix()
in note_editor_view.cpp
:
const QString NoteEditorView::getCompletionPrefix()
{
QTextCursor cursor = textCursor();
cursor.select(QTextCursor::WordUnderCursor);
const QString completionPrefix = cursor.selectedText();
if(!completionPrefix.isEmpty()
&& completionPrefix.at(completionPrefix.length()-1).isLetter()
I'm not sure if there is a requirement for the completionPrefix char to be isLetter()
- I think isLetterOrNumber()
should work here.
Maybe I can get my dev environment up and do a pull request - but that won't happen for a while.
@djsudduth thank you for 🐞- I will look into that.