mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
fix indendation
This commit is contained in:
parent
71e500c039
commit
92c6c3b950
@ -2827,32 +2827,31 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
|
|||||||
needsUpdate = true;
|
needsUpdate = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LFUN_SERVER_GET_STATISTICS:
|
case LFUN_SERVER_GET_STATISTICS: {
|
||||||
{
|
DocIterator from, to;
|
||||||
DocIterator from, to;
|
if (cur.selection()) {
|
||||||
if (cur.selection()) {
|
from = cur.selectionBegin();
|
||||||
from = cur.selectionBegin();
|
to = cur.selectionEnd();
|
||||||
to = cur.selectionEnd();
|
} else {
|
||||||
} else {
|
from = doc_iterator_begin(cur.buffer());
|
||||||
from = doc_iterator_begin(cur.buffer());
|
to = doc_iterator_end(cur.buffer());
|
||||||
to = doc_iterator_end(cur.buffer());
|
}
|
||||||
}
|
|
||||||
|
|
||||||
cur.buffer()->updateStatistics(from, to);
|
cur.buffer()->updateStatistics(from, to);
|
||||||
string const arg0 = cmd.getArg(0);
|
string const arg0 = cmd.getArg(0);
|
||||||
if (arg0 == "words") {
|
if (arg0 == "words") {
|
||||||
cur.message(convert<docstring>(cur.buffer()->wordCount()));
|
cur.message(convert<docstring>(cur.buffer()->wordCount()));
|
||||||
} else if (arg0 == "chars") {
|
} else if (arg0 == "chars") {
|
||||||
cur.message(convert<docstring>(cur.buffer()->charCount(false)));
|
cur.message(convert<docstring>(cur.buffer()->charCount(false)));
|
||||||
} else if (arg0 == "chars-space") {
|
} else if (arg0 == "chars-space") {
|
||||||
cur.message(convert<docstring>(cur.buffer()->charCount(true)));
|
cur.message(convert<docstring>(cur.buffer()->charCount(true)));
|
||||||
} else {
|
} else {
|
||||||
cur.message(convert<docstring>(cur.buffer()->wordCount()) + " "
|
cur.message(convert<docstring>(cur.buffer()->wordCount()) + " "
|
||||||
+ convert<docstring>(cur.buffer()->charCount(false)) + " "
|
+ convert<docstring>(cur.buffer()->charCount(false)) + " "
|
||||||
+ convert<docstring>(cur.buffer()->charCount(true)));
|
+ convert<docstring>(cur.buffer()->charCount(true)));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
LYXERR(Debug::ACTION, "Command " << cmd << " not DISPATCHED by Text");
|
LYXERR(Debug::ACTION, "Command " << cmd << " not DISPATCHED by Text");
|
||||||
|
Loading…
Reference in New Issue
Block a user