Skip to content

Commit af3dfc7

Browse files
committed
Fix incorrect auto complete for some results
1 parent c303ed6 commit af3dfc7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Flow.Launcher.Plugin.OneNote/ResultCreator.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ public Result CreateNewPageResult(string newPageName, OneNoteSection section)
238238
{
239239
Title = $"Create page: \"{newPageName}\"",
240240
SubTitle = $"Path: {GetNicePath(section)}{PathSeparator}{newPageName}",
241-
AutoCompleteText = $"{GetAutoCompleteText}{newPageName}",
241+
AutoCompleteText = $"{GetAutoCompleteText(section)}{newPageName}",
242242
IcoPath = iconProvider.NewPage,
243243
PreviewPanel = GetNewPagePreviewPanel(section, newPageName),
244244
Action = _ =>
@@ -262,7 +262,7 @@ public Result CreateNewSectionResult(string newSectionName, IOneNoteItem parent)
262262
SubTitle = validTitle
263263
? $"Path: {GetNicePath(parent)}{PathSeparator}{newSectionName}"
264264
: $"Section names cannot contain: {string.Join(' ', OneNoteApplication.InvalidSectionChars)}",
265-
AutoCompleteText = $"{GetAutoCompleteText}{newSectionName}",
265+
AutoCompleteText = $"{GetAutoCompleteText(parent)}{newSectionName}",
266266
IcoPath = iconProvider.NewSection,
267267
Action = _ =>
268268
{
@@ -299,7 +299,7 @@ public Result CreateNewSectionGroupResult(string newSectionGroupName, IOneNoteIt
299299
SubTitle = validTitle
300300
? $"Path: {GetNicePath(parent)}{PathSeparator}{newSectionGroupName}"
301301
: $"Section group names cannot contain: {string.Join(' ', OneNoteApplication.InvalidSectionGroupChars)}",
302-
AutoCompleteText = $"{GetAutoCompleteText}{newSectionGroupName}",
302+
AutoCompleteText = $"{GetAutoCompleteText(parent)}{newSectionGroupName}",
303303
IcoPath = iconProvider.NewSectionGroup,
304304
Action = _ =>
305305
{
@@ -336,7 +336,7 @@ public Result CreateNewNotebookResult(string newNotebookName)
336336
SubTitle = validTitle
337337
? $"Location: {OneNoteApplication.GetDefaultNotebookLocation()}"
338338
: $"Notebook names cannot contain: {string.Join(' ', OneNoteApplication.InvalidNotebookChars)}",
339-
AutoCompleteText = $"{GetAutoCompleteText}{newNotebookName}",
339+
AutoCompleteText = $"{ActionKeyword} {settings.Keywords.NotebookExplorer}{newNotebookName}",
340340
IcoPath = iconProvider.NewNotebook,
341341
Action = _ =>
342342
{

0 commit comments

Comments
 (0)