Commit Graph

24674 Commits

Author SHA1 Message Date
Juergen Spitzmueller
07665d1dca Handle movement of environments better
Make sure moved environments (such as frames) are separated from their
new neighbours.
2018-01-11 10:48:47 +01:00
Günter Milde
fcc1cffb1a Do not write LICR macro if character is encodable.
No hardcoded conversion of literal dashes to
\textemdash and \textendash macros.
2018-01-10 15:31:32 +01:00
Pavel Sanda
8c24070c85 RCS: commit undo allowed only in unlocked state. 2018-01-10 10:47:48 +01:00
Jean-Marc Lasgouttes
1de6d3f3f0 Simplify code using range-based for loops 2018-01-08 15:16:58 +01:00
Kornel Benko
6093a3a9b1 Cmake build: Use test/dummy_functions.cpp instead of support/tests/dummy_functions.cpp
Test-programms in src/tests are now handled the same as in autoconf.
2018-01-08 12:58:28 +01:00
Jean-Marc Lasgouttes
66c677b946 Fix ghost caret
This fixes a regression in e64ea357, where a test has been (badly)
tightened to avoid that two consecutive rows may be redrawn to get rid
of caret ghosts. The test prohibited empty rows from being redrawn.

Moreover, improve the test of cursor boundary to avoid the case where
cursor position is already 0.

Fixes bug #10952.
2018-01-08 11:54:57 +01:00
Jean-Marc Lasgouttes
4f21f788b4 Looks like these are not needed for tests in support/ 2018-01-08 11:20:06 +01:00
Jean-Marc Lasgouttes
586890f09e Make #include directories explicit 2018-01-08 11:19:15 +01:00
Jean-Marc Lasgouttes
3aa10c8dba Fix compilation in monolithic mode 2018-01-06 20:46:06 +01:00
Jean-Marc Lasgouttes
af9f3fe8bd Remove unused variables 2018-01-06 15:48:36 +01:00
Guillaume MM
94c65074e0 Fix preview with a nested preview not being shown (#10795)
Regression at db581113.
2018-01-06 02:39:51 -05:00
Jean-Marc Lasgouttes
d77b05db80 Move the inPixels(MetricsBase) help from Length to MetricsBase.
A basic class like Length should not depend on something from
frontend.

This change allows to remove several dummy implementations of
theFontMetrics().
2018-01-05 20:14:04 +01:00
Jean-Marc Lasgouttes
806f40dbd4 Update buffer when an inset or an INFO inset has bee inserted
This is important for info inset, since if updateBuffer needs to be
run in redoParagraph (for the macro code), crashes can happen.

Fixes bug #10944.
2018-01-05 19:32:17 +01:00
Jean-Marc Lasgouttes
76f0a3dd4e Remove 'premature optimization' that proved buggy
At some time it seemed like a good idea in breakRow() to return early
when the row was bound to be empty. It turns out that this creates two
symptoms:

* empty paragraphs will not have an end of paragraph marker

* since row width is not correctly computed in this case, caret ghosts
  can appear in master.

This commit removes the oprimization and replace the do {} while()
construct to a straightforward while() {}.

Related to bug #10952.
2018-01-05 19:15:40 +01:00
Richard Heck
f130f7713f Fix bug #10951.
The Buffer member for the remembered definition_ was not being set.
2018-01-04 15:12:16 -05:00
Juergen Spitzmueller
32efb91438 Do note attempt to nest more than possible. 2018-01-04 18:38:08 +01:00
Juergen Spitzmueller
9a1eeb8cbb Properly handle color none.
Fixes: #5870
2018-01-03 13:20:05 +01:00
Juergen Spitzmueller
f965d23633 Disable useless environment-split function at the core. 2018-01-03 13:16:07 +01:00
Juergen Spitzmueller
7d2764fb9e Use the command-alternatives sequence as defined in menus.bind
Otherwise, the shortcut is not displayed in the menu.
2018-01-03 10:58:30 +01:00
Juergen Spitzmueller
da57a6135e Amend 761a542551 once more.
As it is designed now, Static label is the only case that makes sense.
2018-01-03 08:55:35 +01:00
Juergen Spitzmueller
55349823f0 Limit 761a542551 to the case where we have a label. 2018-01-02 18:05:43 +01:00
Jean-Marc Lasgouttes
39a8000589 Do not use Application for a 'cancel export' boolean
It is not good for a support function to depend of anything outside of
it, especially Application.

Here the boolean that indicates that export should be canceled is put
in Systemcall. This allows to remove all the dummy theApp() function
that have been added here and there for linking needs.
2018-01-02 16:01:07 +01:00
Günter Milde
d852bbd5d9 Fix a comment.
Ligating of -- to en dashes occure also in teletype fonts.
With some 8-bit fonts, em and en dashes are not copied
exported from the PDF (but this is not limited to dashes in teletype).
With LatinModern, PDF export works fine
MWE:
\documentclass[]{article}
%\usepackage{lmodern}
\usepackage[T1]{fontenc}
\begin{document}
Hallo \texttt{Welt --Welt ---Welt}
Hallo Welt --Welt ---Welt
2018-01-02 09:28:04 +01:00
Jean-Marc Lasgouttes
9428ad56b9 Fix 'make check' 2018-01-01 23:55:34 +01:00
Juergen Spitzmueller
8f86feb260 Prepend "Insert " in the context menu for environment separators. 2018-01-01 13:40:49 +01:00
Juergen Spitzmueller
ebc3fee728 mention new option 2018-01-01 12:41:00 +01:00
Juergen Spitzmueller
8a6fa01d14 LyXAction.cpp: Whitespace and line breaking fixes. 2017-12-31 18:57:27 +01:00
Juergen Spitzmueller
99ae8d58c8 Another case where nesting needs to be preserved. 2017-12-31 14:43:45 +01:00
Juergen Spitzmueller
761a542551 Mark follow-up paragraphs in a paragraph group as nested.
This gives a more consistent indication of what belongs to an environment
(and semantically, such paragraphs are synonymous to nested standard
paragraphs)

Addresses part of #9261.
2017-12-31 10:37:35 +01:00
Juergen Spitzmueller
167c38377c Use real cursor pit, not the modified one. 2017-12-31 09:41:43 +01:00
Juergen Spitzmueller
857e70eb83 Maintain nesting when separating outer environment 2017-12-30 18:54:39 +01:00
Juergen Spitzmueller
c8abe0cf7b Move environment-split from Edit to Insert, as requested. 2017-12-30 17:54:09 +01:00
Juergen Spitzmueller
612536305b Don't show append function where it does not make sense. 2017-12-30 17:04:10 +01:00
Juergen Spitzmueller
5c704b5dd1 Revert "Fix environment-split when at pos 0 of a frame title."
This reverts commit 1ff34a973d.
2017-12-30 16:26:20 +01:00
Juergen Spitzmueller
1ff34a973d Fix environment-split when at pos 0 of a frame title.
This introduces a force argument to argument-insert that inserts
arguments even if they are already there. We need this here in order
to prevent DEPM.
2017-12-30 12:50:48 +01:00
Juergen Spitzmueller
27901b3a06 Fix environment-split previous problem spotted by Joel
Special case: append from the separator paragraph.
2017-12-30 11:54:37 +01:00
Richard Heck
d188a36fc2 Fix bug #10835.
VCS InsetInfos were broken by the switch at 2e934fc5f8 to using
updateBuffer to handle them. But we do not really want to go through
that routine in a clone, not for those insets, whose contents we
want to be the same as in the original Buffer.

Also fixes some issues noted in discussion of this bug: Failure to
update after context menu switch; failure to re-calculate shortcuts,
which can change.
2017-12-29 16:09:15 -05:00
Richard Heck
60cb7a1683 Minor code simplification. 2017-12-29 16:00:58 -05:00
Richard Heck
a765f465da Fix problem with BibTeX error reporting.
We only want to abort this process if the process was killed.
Also fix some style issues.
2017-12-29 11:12:17 -05:00
Juergen Spitzmueller
3a4b233dbd Properly implement IsTocCaption for Arguments in standard TOC
Fixes: #10631

Candidate for 2.3.x.
2017-12-29 11:51:24 +01:00
Juergen Spitzmueller
f3b89e4c72 Add IsAutoNestedBy
This is complementary to AutoNests: Styles can determine which other
style should auto-nest them. This is particularly useful for modules
that add new styles which should be auto-nested in a given context.
2017-12-29 10:36:03 +01:00
Juergen Spitzmueller
d6fb2abbea Some AutoNest polishment.
* Rename Nests to AutoNests
* Do it when changing from any style
2017-12-29 10:03:00 +01:00
Juergen Spitzmueller
8c56e89240 EndNests in Layout::write() 2017-12-28 17:56:48 +01:00
Juergen Spitzmueller
99ecc6e2c9 Implement auto-nesting.
Now layouts can specify other layouts that should be nested in and
after the current one (if the layout is switched from the current one
and if it follows a paragraph in the current one).

This is particularly useful for things such as the beamer frames, where
particular layouts are practically always nested.
2017-12-28 17:44:54 +01:00
Juergen Spitzmueller
87a6c75d9d Introduce environment-split before
This one prepends the new environment rather than appending it.

Easy way to add a new beamer frame before the current one.
2017-12-28 14:17:40 +01:00
Juergen Spitzmueller
2907160fff Introduce environment-split previous
This one checks for an environment in the previous paragraph (outside
the nesting scope).
2017-12-28 12:28:01 +01:00
Juergen Spitzmueller
dfaa4e9466 Fix footnotes in table with RevTeX4
These classes come with their own working implementation of table
footnotes, so we are not supposed to use the tablefootnote or
footnote package.

Also add missing outliner name.
2017-12-27 15:43:40 +01:00
Juergen Spitzmueller
87960e3dd8 Open intitle command explicitly also for passthru. 2017-12-27 11:49:54 +01:00
Juergen Spitzmueller
a2f886d526 Use TeXOnePar for the inpreamble layouts
This considers paragraph language and spacing (and simplifies the code)
2017-12-26 13:11:00 +01:00
Juergen Spitzmueller
e55e9c842f Fix inpreamble styles. 2017-12-26 11:40:58 +01:00