Quote file name to table style in LFUN_TABULAR_STYLE_INSERT

This might fix the woes with table styles on windows, where the path
to the system directory has blanks IIRC (C:\Program Files\...)
This commit is contained in:
Juergen Spitzmueller 2024-11-18 10:23:31 +01:00
parent 7016f0c676
commit d42a300dfe

View File

@ -5620,10 +5620,11 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
FileName const tabstyle = libFileSearch("tabletemplates",
style + suffix + ".lyx", "lyx");
if (tabstyle.empty())
break;
break;
UndoGroupHelper ugh(cur.buffer());
cur.recordUndo();
FuncRequest cmd2(LFUN_FILE_INSERT, tabstyle.absFileName() + " ignorelang");
FuncRequest cmd2(LFUN_FILE_INSERT,
quoteName(tabstyle.absFileName()) + " ignorelang");
lyx::dispatch(cmd2);
// go into table
cur.backwardPos();