Hi,

In TortoiseMerge:
- Look at a diff of a changed file, for example from double click in the 
commit dialog.
- Paste a few lines (it doesn't have to be related to the changed lines, in 
the attached image I pasted a few lines in the beginning of the file). 
*TortoiseMerge 
correctly renumbers all lines.*
- Undo (Ctrl-Z). *TortoiseMerge removes the pasted lines but doesn't 
renumber the following lines.* See attached picture with lines 1 5 6 7 etc.

If I understand the code correctly, the line numbering is stored in the 
undo list so I propose to move the call to UpdateViewLineNumbers() above 
SaveUndoStep(), as follows.

[[[
Index: BaseView.cpp
===================================================================
--- BaseView.cpp    (revision 29481)
+++ BaseView.cpp    (working copy)
@@ -6765,9 +6765,9 @@
         {
             m_pwndBottom->InsertViewEmptyLines(nViewLine + 1, 
nLinesToPaste - 1);
         }
+        UpdateViewLineNumbers();
         SaveUndoStep();
 
-        UpdateViewLineNumbers();
         CUndo::GetInstance().EndGrouping();
 
         ptCaretViewPos = SetupPoint(lines[nLinesToPaste - 
1LL].GetLength(), nInsertLine);
]]]

Another solution would be to add another SaveUndoStep() after 
UpdateViewLineNumbers().

Is this analysis correct or do I miss something? Which version is preferred?

/Daniel

-- 
You received this message because you are subscribed to the Google Groups 
"TortoiseSVN-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tortoisesvn-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tortoisesvn-dev/dc65329b-f756-4eaf-8fec-0ebda5ea2118n%40googlegroups.com.

Reply via email to