lyx_mirror/src
Jean-Marc Lasgouttes 503c7c1688 When inserting math inset, put cursor selection in the correct cell
The original use case for this bug is entering an overset inset when
there is a selection. The expected result was to have the selection
pasted in main text, but the result was to have it in the cell.

Insets already have idxFirst() that is able to set cursor to the
"entry" cell of an inset. This patch introduces firstIdx(), which is
the index of this cell and uses it in idxFirst() (idem for
lastIdx/idxLast).

As a consequence, several instances of idxFirst/idxLast can be removed.

Now for the real fix: the two places where the cell in which selection
is inserted seem to be:
* Cursor::macroModeClose
* Cursor::handleNest

These two methods are changed to insert material in the entry cell
instead of cell 0.

idxFirst/Last methods are added to InsetMathRoot and InsetMathStackrel
so that the natural entry point is the nucleus of those insets.

Finallly, a typo is fixed in InsetMathNest::edit() where enter_front
computation was incorrect.
2018-04-05 11:22:02 +02:00
..
client Do not use Application for a 'cancel export' boolean 2018-01-02 16:01:07 +01:00
convert Add description comment for the lyxconvert utility 2017-10-09 08:06:27 +02:00
frontends Upstreaming compilation patch needed for Gentoo. 2018-04-02 15:39:56 +02:00
graphics Fix preview with a nested preview not being shown (#10795) 2018-01-06 02:39:51 -05:00
insets Do not use \tablefootnote in minipages 2018-04-04 10:53:40 +02:00
mathed When inserting math inset, put cursor selection in the correct cell 2018-04-05 11:22:02 +02:00
support Fix bug #11084. 2018-03-21 23:08:38 -04:00
tests Cmake build: Use test/dummy_functions.cpp instead of support/tests/dummy_functions.cpp 2018-01-08 12:58:28 +01:00
tex2lyx small fixup in tex2lyx lstlistings/inputminted support. 2018-03-17 18:26:47 +01:00
.gitignore
AppleSpellChecker.cpp Fix editorial whitespace error 2017-07-30 09:30:58 +02:00
AppleSpellChecker.h
AspellChecker.cpp Fix editorial whitespace issues, e.g. extra space before semicolon 2017-07-30 00:54:12 +02:00
AspellChecker.h
Author.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
Author.h GuiChanges: provide feedback when there are no more changes 2016-05-29 17:55:42 -04:00
BiblioInfo.cpp Differentiate Buffer strings and GUI strings in citeengines 2018-01-27 14:29:41 +01:00
BiblioInfo.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
boost.cpp
Box.cpp
Box.h
BranchList.cpp Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
BranchList.h
buffer_funcs.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
buffer_funcs.h
Buffer.cpp Prevent that a full source preview of a child clears the master's bibfiles cache. 2018-03-27 14:29:25 +02:00
Buffer.h Use separate BibInfo for child 2018-03-22 15:52:23 +01:00
BufferEncodings.cpp Docstringify getLongString in general and preamble snippets in particular 2016-10-17 00:16:59 +02:00
BufferEncodings.h
BufferList.cpp Handle properly undo groups in embedded work areas 2017-12-13 10:46:54 +01:00
BufferList.h Handle properly undo groups in embedded work areas 2017-12-13 10:46:54 +01:00
BufferParams.cpp Fix use of default biblio_style 2018-03-26 15:50:35 +02:00
BufferParams.h The shell escape patch 2017-08-03 13:07:41 +02:00
BufferView.cpp Makes caret height adapt to context in mathed. 2018-04-04 15:11:13 +02:00
BufferView.h New method zoomedPixel to compute pixel amount also in HiDpi 2018-01-25 22:08:35 +01:00
Bullet.cpp
Bullet.h
Changes.cpp Fix issue with change-tracked deleted display math 2017-10-22 13:12:33 +02:00
Changes.h Make the generation of children's tocs more robust 2017-01-14 23:13:14 +01:00
Chktex.cpp grammar 2018-02-18 09:19:03 +01:00
Chktex.h Remove boost/format support 2016-05-29 17:55:45 -04:00
Citation.h Support for "qualified citation lists" 2017-01-21 14:25:17 +01:00
CiteEnginesList.cpp Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
CiteEnginesList.h Fix bug #10901. 2018-02-23 23:17:57 -05:00
CMakeLists.txt Cmake build: Only use the new lyxconvert on MAC 2017-10-03 22:12:23 +02:00
CmdDef.cpp Fix bug #10909. 2018-02-23 23:38:31 -05:00
CmdDef.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
Color.cpp Collapsable -> Collapsible (part 2) 2017-10-16 10:12:21 +02:00
Color.h
ColorCode.h Collapsable -> Collapsible (part 2) 2017-10-16 10:12:21 +02:00
ColorSet.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
Compare.cpp Rename Paragraph::setBuffer to Paragraph::setInsetBuffers, to avoid 2017-10-16 15:48:47 -04:00
Compare.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
CompletionList.h
Converter.cpp Put the dummy tex2lyx support where it is supposed to be. 2017-12-23 15:04:40 -05:00
Converter.h The shell escape patch 2017-08-03 13:07:41 +02:00
ConverterCache.cpp Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
ConverterCache.h
CoordCache.cpp
CoordCache.h
Counters.cpp Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
Counters.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
Cursor.cpp When inserting math inset, put cursor selection in the correct cell 2018-04-05 11:22:02 +02:00
Cursor.h When inserting math inset, put cursor selection in the correct cell 2018-04-05 11:22:02 +02:00
CursorSlice.cpp Rename some macro-related insets 2017-07-05 14:46:34 +02:00
CursorSlice.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
CutAndPaste.cpp Reset buffer language only if we have something to reset. 2018-03-09 12:15:19 +01:00
CutAndPaste.h Move some Cursor methods to CursorData 2017-10-25 16:20:27 +02:00
DepTable.cpp Use FileName::lastModified() intead of stat() in DepTable 2017-03-13 17:06:42 +01:00
DepTable.h Fix compilation warning in DepTable.cpp 2017-03-20 15:38:08 +01:00
Dimension.cpp
Dimension.h Only display a blue rectangle for editable empty insets 2016-11-16 18:33:02 +01:00
DispatchResult.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
DocIterator.cpp Properly communicate forced encodings 2018-01-26 08:38:52 +01:00
DocIterator.h * comment 2018-02-07 23:24:05 +01:00
DocumentClassPtr.h Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
EnchantChecker.cpp Add support for enchant 2.x 2018-01-30 12:11:22 +01:00
EnchantChecker.h
Encoding.cpp Fix bug #10913. 2018-02-23 23:43:59 -05:00
Encoding.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
ErrorList.cpp Initialize pointer class member 2017-03-01 16:34:01 +01:00
ErrorList.h Move class definitions inside main class 2016-10-22 23:24:01 +02:00
Exporter.cpp
Exporter.h
factory.cpp Fix bug #10932. 2018-02-24 00:30:24 -05:00
factory.h
Floating.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
Floating.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
FloatList.cpp
FloatList.h
Font.cpp No manual intervention needed for polyglossia (bidi) and RTL numbers. 2018-02-26 17:06:31 +01:00
Font.h Fix bugs #10650 and #9598 2017-06-03 17:26:05 +02:00
FontEnums.h Correct computation of math font size 2016-11-21 00:02:35 +01:00
FontInfo.cpp Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
FontInfo.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
FontList.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
FontList.h Rewrite setRowHeight using row information 2016-05-30 14:55:41 +02:00
Format.cpp Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
Format.h Move the global formats and system_formats variables into the 2017-03-13 23:40:29 -04:00
FuncCode.h Proper naming of LFUN_SET_GRAPHICS_GROUP. 2018-02-08 21:59:41 +01:00
FuncRequest.cpp Fix initialzation order in FuncRequest 2018-03-19 14:59:43 +01:00
FuncRequest.h Fix Undocked Outliner & multiple window crashes (#11004). 2018-03-12 14:34:24 +01:00
FuncStatus.cpp
FuncStatus.h
Graph.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
Graph.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
HunspellChecker.cpp Adapt to new hunspell C++ ABI 2018-03-29 18:43:11 +02:00
HunspellChecker.h
IndicesList.cpp Fix bug #10915. 2018-02-23 23:47:05 -05:00
IndicesList.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
InsetIterator.cpp
InsetIterator.h
InsetList.cpp Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
InsetList.h Fix some spelling errors reported by Sven 2017-09-22 09:29:16 +02:00
Intl.cpp
Intl.h
KeyMap.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
KeyMap.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
KeySequence.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
KeySequence.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
Language.cpp Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
Language.h Issue an error message if conflicting languages are used 2016-10-27 09:59:01 +02:00
LaTeX.cpp Fix bug #10916. 2018-02-23 23:54:24 -05:00
LaTeX.h Allow makeindex, nomencl, and bibtex runs to be canceled, too. 2017-12-21 18:55:39 -05:00
LaTeXFeatures.cpp Fix bug #10917, and some for loops. 2018-02-23 23:59:40 -05:00
LaTeXFeatures.h Fix footnote output in tables outside floats and longtable header/footer 2017-11-19 10:41:17 +01:00
LaTeXFonts.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
LaTeXFonts.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
LaTeXPackages.cpp
LaTeXPackages.h
Layout.cpp Implement IsTocCaption for normal layouts. 2018-02-21 16:37:07 +01:00
Layout.h Add IsAutoNestedBy 2017-12-29 10:36:03 +01:00
LayoutEnums.h Implement PassThru option to arguments. 2016-10-21 10:39:55 +02:00
LayoutFile.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
LayoutFile.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
LayoutModuleList.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
LayoutModuleList.h Fix bug #11055. 2018-01-28 23:37:20 -05:00
Length.cpp Move the inPixels(MetricsBase) help from Length to MetricsBase. 2018-01-05 20:14:04 +01:00
Length.h Move the inPixels(MetricsBase) help from Length to MetricsBase. 2018-01-05 20:14:04 +01:00
lengthcommon.cpp Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
Lexer.cpp Fix Lexer::getLongString prefix pruning logic 2017-08-29 15:30:44 +02:00
Lexer.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
lyx_commit_hash.h.in
LyX.cpp Fixup 6b6fa94c: coverity says there are more possible exceptions. 2018-01-29 15:06:32 +01:00
LyX.h Move the global formats and system_formats variables into the 2017-03-13 23:40:29 -04:00
LyXAction.cpp Give full pref path in doc for date-insert 2018-03-31 01:04:57 -04:00
LyXAction.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
lyxfind.cpp Fix bug #10933. 2018-02-24 00:32:14 -05:00
lyxfind.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
LyXRC.cpp Fix default spellchecker when only Enchant is available 2018-03-19 14:07:03 +01:00
LyXRC.h Make it possible to select (not)native file dialogs at run time 2018-03-19 11:17:33 +01:00
LyXVC.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
LyXVC.h Do some caching of window title and related UI 2016-10-19 11:59:47 +02:00
lyxwinres.rc
main.cpp Avoid an assertion when compiling in debug mode with MSVC 2015 2017-04-12 21:19:42 +02:00
Makefile.am Collapsable -> Collapsible (part 2) 2017-10-16 10:12:21 +02:00
MetricsInfo.cpp Move the inPixels(MetricsBase) help from Length to MetricsBase. 2018-01-05 20:14:04 +01:00
MetricsInfo.h Move the inPixels(MetricsBase) help from Length to MetricsBase. 2018-01-05 20:14:04 +01:00
ModuleList.cpp Fix indentation 2016-06-26 14:26:35 +02:00
ModuleList.h Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
Mover.cpp
Mover.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
output_docbook.cpp Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
output_docbook.h
output_latex.cpp Fix local polyglossia switch for Arabic 2018-03-06 15:31:43 +01:00
output_latex.h Use TeXOnePar for the inpreamble layouts 2017-12-26 13:11:00 +01:00
output_plaintext.cpp
output_plaintext.h
output_xhtml.cpp Revert "ABOVE and CENTERED labels need special treatment." 2017-10-16 21:28:44 -04:00
output_xhtml.h Add support to cross out characters 2017-04-05 00:01:19 +02:00
output.cpp Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
output.h
OutputEnums.h
OutputParams.cpp Support for multiple bibliographies setting "per child" 2017-02-04 19:23:45 +01:00
OutputParams.h Warn re mixed layouts only for export (#10645) 2017-05-01 20:08:12 -04:00
paper.h Convert remaining C++ files to UTF-8 2015-12-05 19:33:24 +00:00
Paragraph.cpp Fix bug #10920, and some for loops. 2018-02-24 00:04:34 -05:00
Paragraph.h Implement buffer-anonymize more efficiently 2018-02-12 14:38:28 +01:00
ParagraphList.h
ParagraphMetrics.cpp Remove row crc computation 2017-11-11 13:24:08 +01:00
ParagraphMetrics.h Remove row crc computation 2017-11-11 13:24:08 +01:00
ParagraphParameters.cpp
ParagraphParameters.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
ParIterator.cpp
ParIterator.h
PDFOptions.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
PDFOptions.h
PersonalWordList.cpp
PersonalWordList.h
PrinterParams.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
PrinterParams.h
Row.cpp Partial cleanup of the row selection code 2018-01-15 17:20:34 +01:00
Row.h Partial cleanup of the row selection code 2018-01-15 17:20:34 +01:00
RowPainter.cpp Revert "Mark follow-up paragraphs in a paragraph group as nested." 2018-02-08 17:00:41 +01:00
RowPainter.h Set endlabel color correctly when there is a selection 2018-01-16 14:10:30 +01:00
Server.cpp Fix bug #10927 2018-02-24 12:48:02 +01:00
Server.h Properly track the lifetime of signals2::slots (#8261) 2017-06-11 19:51:17 +02:00
ServerSocket.cpp Fix missing include for file i/o prototypes after header cleanup in change 489dca71cd 2016-07-04 10:30:19 +02:00
ServerSocket.h Replace support/shared_ptr.h and boost::shared_ptr with std::shared_ptr 2016-06-09 15:21:39 +01:00
Session.cpp Avoid asserting when reading the session file 2017-12-02 10:46:46 +01:00
Session.h The shell escape patch 2017-08-03 13:07:41 +02:00
sgml.cpp Make static counters atomic 2016-07-31 18:34:33 +01:00
sgml.h
Spacing.cpp Fix switch of language and line spacing in InTitle commands. 2017-12-23 13:27:10 +01:00
Spacing.h Fix switch of language and line spacing in InTitle commands. 2017-12-23 13:27:10 +01:00
SpellChecker.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
TexRow.cpp Improvement to the reverse-search algorithm 2016-10-22 23:24:01 +02:00
TexRow.h Fix compilation on cygwin & others 2016-10-23 00:25:05 +02:00
texstream.cpp Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
texstream.h Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
Text2.cpp Collapsable -> Collapsible (part 2) 2017-10-16 10:12:21 +02:00
Text3.cpp Fix bug #11084. 2018-03-21 23:08:38 -04:00
Text.cpp Fix bug #11102. 2018-04-03 18:39:28 -04:00
Text.h Move some Cursor methods to CursorData 2017-10-25 16:20:27 +02:00
TextClass.cpp Differentiate Buffer strings and GUI strings in citeengines 2018-01-27 14:29:41 +01:00
TextClass.h Add special chain for Modules with OutputFormat for pLaTeX (Japanese) 2017-09-01 10:27:12 +02:00
TextMetrics.cpp Fix bug #10929. 2018-02-24 00:25:56 -05:00
TextMetrics.h Update insets position in cache in more cases 2017-09-08 16:57:22 +02:00
Thesaurus.cpp Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
Thesaurus.h
Toc.h Replace support/shared_ptr.h and boost::shared_ptr with std::shared_ptr 2016-06-09 15:21:39 +01:00
TocBackend.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
TocBackend.h Collect the outliner names for the children's tocs 2017-01-14 23:13:14 +01:00
TocBuilder.cpp Reorganise and simplify 2017-01-09 23:15:16 +01:00
TocBuilder.h Reorganise and simplify 2017-01-09 23:15:16 +01:00
Trans.cpp Fix bug #10930. 2018-02-24 00:28:37 -05:00
Trans.h
Undo.cpp Improve UndoGroupHelper and use it more 2017-12-13 11:10:49 +01:00
Undo.h Better handling of multiple buffers in UndoGroupHelper 2017-11-29 14:46:15 +01:00
update_flags.h Allow multiple calls to processUpdateFlags before redraw 2017-10-24 22:25:29 +02:00
VCBackend.cpp RCS: commit undo allowed only in unlocked state. 2018-01-10 10:47:48 +01:00
VCBackend.h Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
version.cpp
version.h Add support for xcharter font. 2018-03-15 15:44:49 +01:00
VSpace.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
VSpace.h
WordLangTuple.h
WordList.cpp Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
WordList.h Fix memory leak with WordLists 2016-12-31 15:29:43 +01:00