diff --git a/src/main/java/net/imagej/legacy/plugin/MacroAutoCompletionProvider.java b/src/main/java/net/imagej/legacy/plugin/MacroAutoCompletionProvider.java index 533724f1d..080165278 100644 --- a/src/main/java/net/imagej/legacy/plugin/MacroAutoCompletionProvider.java +++ b/src/main/java/net/imagej/legacy/plugin/MacroAutoCompletionProvider.java @@ -236,6 +236,10 @@ private BasicCompletion makeListEntry( headline = headline.substring(0, headline.length() - 2); } + if (headline.endsWith("\n")) { + headline = headline.substring(0, headline.length() - 1); + } + return new BasicCompletion(provider, headline, null, description); }