Mergely icon indicating copy to clipboard operation
Mergely copied to clipboard

Collapse non-changes incl. tolerance

Open ghost opened this issue 9 years ago • 2 comments

First glance of omitting non-changes by using the CodeMirror's text-marking collapse functionality. This includes a tolerance of 3 lines before and after each change. Further improvements under investigation (if you have any suggestions, please shoot):

  • Replace collapsed coded with a space or line;
  • Correct fancy markup drawings in the middle;
  • Show collapsed line numbers.

ghost avatar Apr 29 '15 12:04 ghost

It's a very good start. Code is clean too. I was able to get the Mergely editor to use the new option easy enough. Some issues I had with an example file:

  1. appears to always show line 1
  2. numbering is wonky
  3. appears to show the last few lines
  4. merge/left right seems to reset the view

Have you seen the CodeMirror code-folding demo? https://codemirror.net/demo/folding.html. I wonder if it is useful here?

wickedest avatar Apr 29 '15 14:04 wickedest

Thanks for the quick review.

  1. Indeed because the 1st one starts 1 line after each change or line 0 the 1st time. Working on that!
  2. Numbering should be correct, but is hard to read now because they don't follow.
  3. Seems to be the same problem as point 1. Here it seem to be more lines.
  4. Not sure what you mean here. It's only when you merge left into right? I don't see a difference.

ghost avatar Apr 29 '15 15:04 ghost