diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b5a4c44696..93e8425e794 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -99,7 +99,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve - We fixed an issue when an "Abstract field" was duplicating text, when importing from RIS file (Neurons) [#6065](https://github.com/JabRef/jabref/issues/6065) - We fixed an issue where adding the addition of a new entry was not completely validated [#6370](https://github.com/JabRef/jabref/issues/6370) - We fixed an issue where the blue and red text colors in the Merge entries dialog were not quite visible [#6334](https://github.com/JabRef/jabref/issues/6334) - +- We fixed an issue where underscore character was removed from the file name in the Recent Libraries list in File menu [#6383](https://github.com/JabRef/jabref/issues/6383) ### Removed diff --git a/src/main/java/org/jabref/gui/menus/FileHistoryMenu.java b/src/main/java/org/jabref/gui/menus/FileHistoryMenu.java index 9456c3d53c3..f2a6b534407 100644 --- a/src/main/java/org/jabref/gui/menus/FileHistoryMenu.java +++ b/src/main/java/org/jabref/gui/menus/FileHistoryMenu.java @@ -53,6 +53,12 @@ private void setItems() { private void addItem(Path file, int num) { String number = Integer.toString(num); MenuItem item = new MenuItem(number + ". " + file); + // By default mnemonic parsing is set to true for anything that is Labeled, if an underscore character + // is present, it would create a key combination ALT+the succeeding character (at least for Windows OS) + // and the underscore character will be parsed (deleted). + // i.e if the file name was called "bib_test.bib", a key combination "ALT+t" will be created + // so to avoid this, mnemonic parsing should be set to false to print normally the underscore character. + item.setMnemonicParsing(false); item.setOnAction(event -> openFile(file)); getItems().add(item); }