Stephan Witt [Thu, 26 Jul 2012 22:34:17 +0000 (00:34 +0200)]
Fix bug #8238: correct the forward argument of replace2string() in on_replacePB_clicked().
(cherry picked from commit 44b327800666f30d2713c6c9e26f275aadfa4b9c)
Fix the wrong cursor move when forward flag is false:
The forward flag is used to place the cursor behind the replaced text if it's true.
But it's not correct to move the cursor if it's false. The cursor is in front of the
replacement already after the replaceSelectionWithString() was done.
(cherry picked from commit 430cf3ee5ef125b8bc610300afca58437b734306)
Fix bug #7741: incorrect locale when starting R from LyX?
The goal here is to get rid of the old code that modified variables
LANGUAGE and LC_ALL, therefore creating the problems mentionned
in the ticket.
In the new system, there is no explicit "GUI" message handler, that
needs to be reset at each language change. Instead, getGuiMessages
calls getMessages with the correct parameter. This allows to simplify
greatly the code and to remove a lot of old cruft.
Do not kill the undo stack when doing a Save As...
The code does a reload on the buffer to avoid loose pointers if the
file changes directory. This commit adds a bool parameter to
Buffer::reload to allow for keeping the undo stack intact. This is of
couse only wanted in this case, not when reloading an earlier version
of the file.
In the existing code for setting layout of pragraph parameters,
Text::undoSpan is used to "guess" which paragraphs should be saved in Undo.
With this patch the approach is more precise: before every explicit change
to a paragraph, a Cursor::recordUndo call is inserted. This is much more robust than trying to guess.
In particular, we do not look at depth changes at all, since they are now
handled in updateBuffer since #8159 has been fixed.
It is not a good idea to slice an utf8 string at arbitrary offsets, we have to work on a docstring instead.
We need unfortunately to switch back and forth between utf8 and docstring.
* Assure that really no language package is called when none is selected.
* Only call global custom package if global is desired.
This is a candidate for branch as well.
Richard Heck [Sat, 21 Jul 2012 18:14:12 +0000 (14:14 -0400)]
Fix a long-standing FIXME by resetting only the counter for top-level
sectioning when we see an appendix. This fixes bug #8271, whose root
cause was the fact that we were resetting all the counters inside ERT.
Richard Heck [Fri, 13 Jan 2012 03:31:01 +0000 (03:31 +0000)]
Fix crash reported on list when renaming a child buffer and
then trying to compile.
There are really two problems here. One is that the renamed
buffer needs to be reloaded. All kinds of files, etc, may not
exist any more, if we've been saved to a new directory; our
children e.g. may not be in the right place. And, in this case,
we may no longer be a child of our old parent. Reloading will
fix all of that.
On reload, though, we need to clear our parent, since we may
not have one any more. It will get reset if need be.
Make sure that undo is recorded when magic tricks are played with InsetBibitem.
Fixes bug #7111: Assertion with undo and InsetBibitem
* add Paragraph::brokenBiblio(), with tells whether there is something to fix.
* rename Paragraph::checkBiblio to fixBiblio; simplify it greatly by using
InsetList methods
* In TextMetrics::redoParagraph, call recordUndo before fixBiblio (only when
there is something to fix obviously)
Special care is taken to update cursor only when it makes sense. Note
that there are cases where undo information is not recorded (current
cursor not in the slice where action happens)
Add \makeat switches to babel settings if necessary.
Babel settings might contain @ characters. Check for this and wrap the settings into \makeatletter ... \makeatother switches if necessary (see discussion at #8265).
- UserGuide.lyx: fix description of the labeling lists, fixes also bug #8224
- German UserGuide.lyx: adapt some sections to be compliant with the other language variants
Uwe Stöhr [Sat, 30 Jun 2012 23:42:32 +0000 (01:42 +0200)]
make tex2lyx in branch compilable again
- Preamble.cpp/:
- move list definition out of anon namespace
- declare lists and a function in the class
- remove ancientgreek since this is LyX 2.1-only
The idea is to record undo at the place where the document is modified:
1/ in Buffer::updateBuffer, add a recordUndo, with the caveat that a
const_cast has to be used (because updateBuffer is const but
modifies the document, go figure).
2/ in GuiApplication::dispatch, add an extra undo group that
encompasses the updateBuffer call. Some other undo groups may be
redundant now, but it is not a problem since they do not cost
anything.
Uwe Stöhr [Fri, 22 Jun 2012 23:06:57 +0000 (01:06 +0200)]
generate_contributions.py:
- add Nickolay Shashkin
- update maintainer status
- add other new contributers whose code was in the meantime applied to branch