Exemplo n.º 1
0
        void Command_Diff_Fix_LineEndings()
        {
            if (DiffTarget == null)
            {
                throw new Exception("Diff not in progress");
            }

            var fixes = TextData.GetDiffFixes(DiffTarget.Data, Data, 0, DiffIgnoreWhitespace, DiffIgnoreCase, DiffIgnoreNumbers, null, DiffIgnoreCharacters);

            SetSelections(fixes.Item1.Select(tuple => new Range(tuple.Item1, tuple.Item2)).ToList());
            ReplaceSelections(fixes.Item2);
        }
Exemplo n.º 2
0
        void Command_Diff_Fix_Whitespace(DiffFixWhitespaceDialog.Result result)
        {
            if (DiffTarget == null)
            {
                throw new Exception("Diff not in progress");
            }

            var fixes = TextData.GetDiffFixes(DiffTarget.Data, Data, result.LineStartTabStop, null, DiffIgnoreCase, DiffIgnoreNumbers, DiffIgnoreLineEndings, DiffIgnoreCharacters);

            SetSelections(fixes.Item1.Select(tuple => new Range(tuple.Item1, tuple.Item2)).ToList());
            ReplaceSelections(fixes.Item2);
        }