mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Disable CheckTeX while buffer is processed
Since CheckTeX itself processes the tex file, a synchronous run with a TeX process can lead to all sorts of conflicts, including crashes. Fixes: #7434.
This commit is contained in:
parent
dadec50a18
commit
71fea63326
@ -595,7 +595,7 @@ Menuset
|
|||||||
Item "Spellchecker...|S" "dialog-show spellchecker"
|
Item "Spellchecker...|S" "dialog-show spellchecker"
|
||||||
OptItem "Thesaurus...|T" "thesaurus-entry"
|
OptItem "Thesaurus...|T" "thesaurus-entry"
|
||||||
Item "Statistics...|a" "statistics"
|
Item "Statistics...|a" "statistics"
|
||||||
OptItem "Check TeX|h" "buffer-chktex"
|
Item "Check TeX|h" "buffer-chktex"
|
||||||
Item "TeX Information|I" "dialog-show texinfo"
|
Item "TeX Information|I" "dialog-show texinfo"
|
||||||
Item "Compare...|C" "dialog-show compare"
|
Item "Compare...|C" "dialog-show compare"
|
||||||
Separator
|
Separator
|
||||||
|
@ -2528,10 +2528,6 @@ bool Buffer::getStatus(FuncRequest const & cmd, FuncStatus & flag)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case LFUN_BUFFER_CHKTEX:
|
|
||||||
enable = params().isLatex() && !lyxrc.chktex_command.empty();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case LFUN_BUILD_PROGRAM:
|
case LFUN_BUILD_PROGRAM:
|
||||||
enable = params().isExportable("program", false);
|
enable = params().isExportable("program", false);
|
||||||
break;
|
break;
|
||||||
@ -2644,10 +2640,6 @@ void Buffer::dispatch(FuncRequest const & func, DispatchResult & dr)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case LFUN_BUFFER_CHKTEX:
|
|
||||||
runChktex();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case LFUN_BUFFER_EXPORT_CUSTOM: {
|
case LFUN_BUFFER_EXPORT_CUSTOM: {
|
||||||
string format_name;
|
string format_name;
|
||||||
string command = split(argument, format_name, ' ');
|
string command = split(argument, format_name, ' ');
|
||||||
|
@ -1931,6 +1931,19 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
|
|||||||
enable = theBufferList().last() != theBufferList().first();
|
enable = theBufferList().last() != theBufferList().first();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case LFUN_BUFFER_CHKTEX: {
|
||||||
|
if (!doc_buffer || !doc_buffer->params().isLatex()
|
||||||
|
|| d.processing_thread_watcher_.isRunning()) {
|
||||||
|
// grey out, don't hide
|
||||||
|
enable = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// hide if we have no checktex command
|
||||||
|
enable = !lyxrc.chktex_command.empty();
|
||||||
|
flag.setUnknown(!enable);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case LFUN_VIEW_SPLIT:
|
case LFUN_VIEW_SPLIT:
|
||||||
if (cmd.getArg(0) == "vertical")
|
if (cmd.getArg(0) == "vertical")
|
||||||
enable = doc_buffer && (d.splitter_->count() == 1 ||
|
enable = doc_buffer && (d.splitter_->count() == 1 ||
|
||||||
@ -3794,6 +3807,11 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
gotoNextOrPreviousBuffer(PREVBUFFER, true);
|
gotoNextOrPreviousBuffer(PREVBUFFER, true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case LFUN_BUFFER_CHKTEX:
|
||||||
|
LASSERT(doc_buffer, break);
|
||||||
|
doc_buffer->runChktex();
|
||||||
|
break;
|
||||||
|
|
||||||
case LFUN_COMMAND_EXECUTE: {
|
case LFUN_COMMAND_EXECUTE: {
|
||||||
command_execute_ = true;
|
command_execute_ = true;
|
||||||
minibuffer_focus_ = true;
|
minibuffer_focus_ = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user