Author Topic: Diff h-scroller thumb has too much range  (Read 2300 times)

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
Diff h-scroller thumb has too much range
« on: September 12, 2016, 09:20:29 PM »
In the normal editor, the thumb for the hscroller is sized such that when you drag it all the way to the right, the longest text extends to about about 2/3's of the width of the window.


In DZ, the hscroll extends too far - and will scroll all the text of the longest line in the file off the left edge

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2897
  • Hero Points: 153
Re: Diff h-scroller thumb has too much range
« Reply #1 on: September 13, 2016, 02:14:39 PM »
There's two things going on here.

One is that in the regular editor windows, the horizontal scroll bar is calculated for each page.  In DIFFzilla, it's calculated for the entire buffer.  So it's going to be based on the longest line in the file.  There isn't much I can do about this.

The other is that the regular editor window seems to base it's scroll bar on scrolling the longest line on the page to the right edge of the window.  DIFFzilla seems to be basing it on scrolling the longest line all the way off of the screen to the left.  I might be able to make this a bit more consistent.

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
Re: Diff h-scroller thumb has too much range
« Reply #2 on: September 13, 2016, 02:45:09 PM »
As Clark mentioned in a related post, virtual space factors in here.


In a simple editor like Notepad, the hscroller only needs to scroll enough to let all the text be visible.
In Slick it scrolls a bit more to allow for some virtual space (even when virtual space options are turned off).


In DZ, virtual space isn't such an issue - so I would expect it to scroll no more that the normal Slick editor window, and possibly less - just enough to make the longest line visible.




Question: How does DZ handle *really* large files? Normally Slick avoids reading the whole file, or at least not keeping it all in memory. Does DZ work well with that? (It would make finding the longest line harder I suppose).

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2897
  • Hero Points: 153
Re: Diff h-scroller thumb has too much range
« Reply #3 on: September 13, 2016, 03:20:59 PM »
Question: How does DZ handle *really* large files? Normally Slick avoids reading the whole file, or at least not keeping it all in memory. Does DZ work well with that? (It would make finding the longest line harder I suppose).

The whole file has to be read in to diff it, but it uses the editor engine so it isn't necessarily all kept in memory.  There is an editor built in that finds the longest line.  I believe that if the whole file has been read in it does not have to read from disk to get the line length.