X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetQuotes.cpp;h=f5823605543455e820e7fec88a828ced16348efa;hb=8124e6c02ea1fd6779bb6c47ffe2bca2c8bd2d97;hp=6fcc755d816e7ee44029afc62caf1fa20b49b2de;hpb=bc73a85778ffb1432bdc510d9a710e7394f42163;p=lyx.git diff --git a/src/insets/InsetQuotes.cpp b/src/insets/InsetQuotes.cpp index 6fcc755d81..f582360554 100644 --- a/src/insets/InsetQuotes.cpp +++ b/src/insets/InsetQuotes.cpp @@ -1021,4 +1021,28 @@ string InsetQuotes::contextMenuName() const return "context-quote"; } + +pair InsetQuotes::isWords() const +{ + int length = 1; + // In PassThru, we use straight quotes otherwise we need to check for French + if (!pass_thru_) { + + QuoteStyle style = (style_ == QuoteStyle::Dynamic) ? global_style_ : style_; + + // in French, thin spaces are added inside double guillemets + if (level_ == QuoteLevel::Primary + && (style == QuoteStyle::Swiss + || style == QuoteStyle::French + || style == QuoteStyle::FrenchIN) + && prefixIs(context_lang_, "fr")) { + // space added by default for all formats + length++; + } + } + + //one or two characters from the statistics perspective + return std::pair(length, 0); +} + } // namespace lyx