Commit Graph

39822 Commits

Author SHA1 Message Date
Günter Milde
1c57fc31aa Minor documentation fix. 2019-02-28 23:01:14 +01:00
Günter Milde
9abd46b4d5 Fix AttributeError with Python 3.
At least since Python 3.5, `output` is already a
(unicode) string and does not have a "decode" method.
2019-02-28 22:59:30 +01:00
Günter Milde
e665715fc4 Don't switch encodings when a document wide encoding is specified.
Remove special code for CJK that is no longer required after
we use CJKutf8 document-wide with inputenc "utf8-cjk"
(and "utf8" for languages requiring CJK) (since 7bbf333fa1).

CJK characters can no longer be used with a document-wide 8-bit encoding.
(Hint: Use utf8-cjk or one of the CJK legacy encodings if your document contains CJK characters.)
2019-02-28 22:55:43 +01:00
Kornel Benko
9d6b71c6b3 FindAdv: Use isAlnumASCII() instead of std::isalnum()
Thanks Jean-Marc
2019-02-28 13:00:12 +01:00
Jean-Marc Lasgouttes
32d6396f88 Use || instead of or operator
It is more consistent and visual studio seems to dislike it anyway.
2019-02-28 12:03:34 +01:00
Kornel Benko
2c5c397afa Amend aaffcd0b: Remove some remnants ... 2019-02-27 10:33:25 +01:00
Kornel Benko
aaffcd0b39 FindAdv: Do not use data from included listing if in search mode
Fixes #11496 	"Find and replace (advanced)" is too slow
2019-02-27 10:17:56 +01:00
Kornel Benko
b1f93e0982 FindAdv: Try to use a better algorithm to find begin of a searched string 2019-02-26 23:00:31 +01:00
Günter Milde
6ee140f413 ctest update
* Do not change font choices when testing with non-TeX fonts.
* Add "nonstandard" tag for documents with requirements outside TeXLive.
* Ignore missing character in legacy Basque document.
2019-02-26 19:13:15 +01:00
Jean-Marc Lasgouttes
954531f247 Update screen as needed when preferences are changed
This commit removes the adhoc code in GuiPrefs and moves it to LyXRC,
so that it triggers in every preference change.

The code has also been updated to trigger on more variables, e.g.
font_*_foundry.

Note that the actual function that are called have not been changed
(addPreviews and LFUN_SCREEN_FONT_UPDATE), although there are doubts
that they behave as needed (see FIXMEs).

Fixes bug #11498.
2019-02-26 16:53:14 +01:00
Kornel Benko
babb291ef3 FindAdv: Partially revert e69f7022
The slowness returns, but the search works again
2019-02-26 13:24:36 +01:00
Kornel Benko
016c7d6260 Amend 4028eefe: Make callstack printing useful and optional
Added the option to cmake too
2019-02-26 09:50:58 +01:00
Richard Kimberly Heck
5b959033d2 Fix bad error message (bug 11486). 2019-02-25 21:56:40 -05:00
Jean-Marc Lasgouttes
4028eefe61 Make callstack printing useful and optional
When callback printing is enabled, link lyx with -rdynamic, so that
stacks have LyX symbols available.

Add option --disable-callstack-printing to configure.

Running "size" on binary:
 * with callstack printing support
   text	   data	    bss	    dec	    hex	filename
20891684	  34680	 107796	21034160	140f4b0	src/lyx

 * without callstack printing support
    text	   data	    bss	    dec	    hex	filename
17953640	  34648	 107796	18096084	1141fd4	src/lyx
2019-02-25 17:58:06 +01:00
Jean-Marc Lasgouttes
e78a5bd1a8 Fix help message for --disable-qt5 2019-02-25 16:24:30 +01:00
Jean-Marc Lasgouttes
bc128e7bf8 Use range-based loops in BufferList 2019-02-25 15:19:58 +01:00
Jean-Marc Lasgouttes
7f0525e9e0 Change the way scrolled rows are tracked
The goal of this commit is to simplify the logic in TextMetrics::draw.
Now, rows are repainted depending on their changed() status.

Instead of checking whether rows have been scrolled horizontally at
draw time, the code marks the row as changed when testing for
horizontal scrolling.

To this end a new method TestMetrics::setRowChanged is added, that
searches a row in the text metrics cache and marks it changed if
found.

The old code that remembered the previously scrolled row can now be
removed.
2019-02-25 15:19:58 +01:00
Kornel Benko
e69f702275 FindAdv: Fix #11496 -- too slow find
Also added some more macros to handle
2019-02-25 12:12:19 +01:00
Jean-Marc Lasgouttes
ab02a907f0 Move some TextMetrics code around.
No change intended.
2019-02-25 11:58:50 +01:00
Günter Milde
4de4263f93 ctest update.
* set required non-TeX fonts in the documents
* update comments for inverted tests
* update some tags
2019-02-25 01:19:14 +01:00
Kornel Benko
6a6b670bbd FindAdv: Correctly match '\[' and '\]' in regular expressions with format enabled
We have to check for instances of '{[}' and '{]}' and
omit removing the enclosing parentheses
2019-02-23 13:11:34 +01:00
Pavel Sanda
b1132a3438 Add few hints for varwidth module. 2019-02-22 16:51:14 +01:00
Pavel Sanda
852896da33 rebuild credits 2019-02-22 16:43:51 +01:00
Kornel Benko
44a06adb6c FindAdv: debug info
1.) Fill the 'head'-member to easier recognize the macro. May be discarded
 later, although it does not take too much run-time
2.) Add some comment
3.) Ignore any macro inside the regex.
2019-02-22 13:21:23 +01:00
Kornel Benko
01fd1f7679 FindAdv: Discard \parbox, \input macros
The languge of these macros does not matter. What's more,
without removing them we may obtain wrong matching.
2019-02-21 20:32:08 +01:00
Kornel Benko
8a0db92523 FindAdv: Handle \shortcut
Essentially remove the header and handle the language inside
\shortcut{...} appropriately
2019-02-21 14:45:41 +01:00
Jean-Marc Lasgouttes
9bdc0dab31 Honor Update::SinglePar properly
The SinglePar update flags has been a no-op for a long time without
naybody noticing. This means that the current paragraph was
always rebroken and redrawn, even when only moving the cursor around.

Now we only do that when Update::SinglePar has been specified. This
means that there may be cases where update will not be correct
anymore, because this flag has not been specified. These places will
have to be found and fixed.

Update PAINTING_ANALYSIS.
2019-02-20 14:41:22 +01:00
Kornel Benko
a298fc55d9 FindAdv: Added handling for latex environments
1.) Make sure the environment is mentioned in the string for search
  (Added the keyword \latexenvironment{...})
2.) Handle it similar to \textcolor{}

That way we can also search for 'conclusion*' or 'summary' etc
in Additional.lyx.
2019-02-20 14:14:50 +01:00
Kornel Benko
0a2dda0904 Findadv: Added handling for frontmatter macros
title, subtitle, author etc.
2019-02-19 23:11:09 +01:00
Enrico Forestieri
c3b9504835 Fix bug #11490
Correctly add the branch name suffix when the stem
of the filename contains a dot.
2019-02-19 19:51:11 +01:00
Jean-Marc Lasgouttes
2ae51b947b Rename TextMetrics::dimension() to dim() 2019-02-19 18:04:43 +01:00
Jean-Marc Lasgouttes
91fc45ed35 Do not use trailing underscore for local variable 2019-02-18 16:04:15 +01:00
Jean-Marc Lasgouttes
4c90183e4d Remove unused method 2019-02-18 16:03:38 +01:00
Jean-Marc Lasgouttes
a04b5c3965 Rename Row::dimension() to dim()
This is what is done elsewhere.
2019-02-18 15:47:27 +01:00
Jean-Marc Lasgouttes
10e2c65835 Let tm be a reference here as elsewhere 2019-02-18 15:47:27 +01:00
Jean-Marc Lasgouttes
6293bdbb5a DEPM: document that Freespacing implies KeepEmpty. 2019-02-18 15:36:21 +01:00
Jean-Marc Lasgouttes
26ad2c6a67 Do a round of DEPM after changing layout 2019-02-18 15:36:21 +01:00
Jean-Marc Lasgouttes
386a347484 DEPM: allow to delete empty paragraphs after deleting extra spaces
Remove return statement when spaces have been deleted.

Add an early return in part 2 when current paragraph is not empty.

Remove some comments that concern things that are OK now.
2019-02-18 15:36:21 +01:00
Jean-Marc Lasgouttes
aaab1ad65d DEPM: do not strip explicitly leading spaces
For the local version of DEPM, only what was around old cursor should change

For the global version, leading spaces are already handled.
2019-02-18 15:36:21 +01:00
Jean-Marc Lasgouttes
1f1a1b0dc7 DEPM: replace loop by existing method 2019-02-18 15:36:21 +01:00
Jean-Marc Lasgouttes
b59b968c3e DEPM: reorganize a bit (no change intended)
Exit early if the cursor has not moved.

Place comments where they belong.
2019-02-18 15:36:21 +01:00
Jean-Marc Lasgouttes
2dc62d0405 DEPM: handle undo when deleting spaces
Also, do not do any DEPM when the buffer is read-only.
2019-02-18 15:36:21 +01:00
Juergen Spitzmueller
dbe963a1ef Fix copy/paste error spotted by coverity. 2019-02-18 15:14:16 +01:00
Jean-Marc Lasgouttes
c521e3e1de Initialize member
Spotted by coverity
2019-02-18 15:10:30 +01:00
Juergen Spitzmueller
71737b87f9 Basic support for biblatex-chicago
This uses a specific wrapper package that must be loaded instead of
biblatex.

Via "Requires biblatex-chicago", this is now possible.

For proper support, a citeengine file needs to be written

This commit here could also be backported to stable.
2019-02-18 13:14:53 +01:00
Kornel Benko
96ca66d664 FindAdv: Handle more cases
Some macros need:
1.) Take care of case sensitivity
2.) Better handling of used argument values
3.) Cleaner list-environment search
4.) Remove superfluous '~' if searching for description or labeling env
2019-02-18 00:40:55 +01:00
Kornel Benko
dfbe29317d FindAdv: Even more fine tuning 2019-02-16 18:39:10 +01:00
Scott Kostyshak
1cc6c5055a Intro.lyx: remove a "short title"
This short title removed a spaced, and when taking a look we decided
that the advantages of removing it (simplicity and consistency)
outweigh the benefits of having a shorter entry in the table of
contents and PDF bookmarks.
2019-02-15 12:20:50 -05:00
Günter Milde
124e3c92e2 ctests: useSystemFonts.pl -- revert changes in 1879fbedfb. 2019-02-15 07:07:15 +01:00
Günter Milde
251161db89 ctests: "Uninvert" IEEE tests with non-TeX fonts. Fix missing characters.
Documents used deprecated or lookalike characters missing in
Latin Modern system fonts:

Customization.lyx: "figure dash" instead of "emdash".
revtex4-1: "Angstrom sign" instead of "latin letter A with ring".
2019-02-14 01:06:57 +01:00