Re: Diff should indicate if no differences detected

2016-08-30 Fir de Conversatie JohnBeckett
On Tuesday, August 30, 2016 at 5:56:01 AM UTC+10, Bram Moolenaar wrote: >> gvim -N -u NONE >> >> :let lines = range(1, 999) >> :call writefile(lines, 'old.tmp') >> :call writefile(['inserted'] + lines, 'new.tmp') >> :e new.tmp >> :vert diffs old.tmp >> >> One way to execute the commands is to copy

Re: Diff should indicate if no differences detected

2016-08-29 Fir de Conversatie Bram Moolenaar
John Beckett wrote: > On Sunday, August 28, 2016 at 10:40:05 PM UTC+10, Bram Moolenaar wrote: > > John Beckett wrote: > >> It is a real problem that Vim can mislead the user into thinking there > >> is no difference, when in fact a new line has been inserted at the top > >> of the other window. J

Re: Diff should indicate if no differences detected

2016-08-29 Fir de Conversatie JohnBeckett
On Sunday, August 28, 2016 at 10:40:05 PM UTC+10, Bram Moolenaar wrote: > John Beckett wrote: >> It is a real problem that Vim can mislead the user into thinking there >> is no difference, when in fact a new line has been inserted at the top >> of the other window. Just scrolling one window to the

Re: Diff should indicate if no differences detected

2016-08-28 Fir de Conversatie JohnBeckett
On Sunday, August 28, 2016 at 11:26:51 PM UTC+10, Christian Brabandt wrote: > Would a message, if both files are the same, be sufficient? I think diff > always returns 0 if there are no differences found, so we could simply > show a message in that case. Hi Christian, Thanks for the suggestion bu

Re: Diff should indicate if no differences detected

2016-08-28 Fir de Conversatie Christian Brabandt
Hi JohnBeckett! On Sa, 27 Aug 2016, JohnBeckett wrote: > Can something be done to give a more convincing display of whether the > two buffers have a difference? The problem is that Vim's logic for > positioning the top line of the window shows the minimum amount of > text in the above scenario (p

Re: Diff should indicate if no differences detected

2016-08-28 Fir de Conversatie Manuel Ortega
On Sun, Aug 28, 2016 at 6:05 AM, toothpik wrote: > On Sat, Aug 27, 2016 at 08:32:09PM -0700, JohnBeckett wrote: > > Bram recently fixed :diffoff! > > https://groups.google.com/forum/#!topic/vim_dev/h1nREhhF7mY > > > That reminds me of a diff frustration. > > > Suppose I have two files expected.tx

Re: Diff should indicate if no differences detected

2016-08-28 Fir de Conversatie Bram Moolenaar
John Beckett wrote: > On Sunday, August 28, 2016 at 8:05:29 PM UTC+10, toothpik wrote: > >> :tabe expected.txt > >> :vert diffs output.txt > > > >> When I last viewed those files, I may have exited with the cursor > >> on the last line. I use the code from ":help restore-cursor" to > >> restore t

Re: Diff should indicate if no differences detected

2016-08-28 Fir de Conversatie toothpik
On Sun, Aug 28, 2016 at 03:46:13AM -0700, JohnBeckett wrote: > On Sunday, August 28, 2016 at 8:05:29 PM UTC+10, toothpik wrote: > >> :tabe expected.txt > >> :vert diffs output.txt > > > >> When I last viewed those files, I may have exited with the cursor > >> on the last line. I use the code from "

Re: Diff should indicate if no differences detected

2016-08-28 Fir de Conversatie Christ van Willegen
Op 28 aug. 2016 12:46 schreef "JohnBeckett" : > > On Sunday, August 28, 2016 at 8:05:29 PM UTC+10, toothpik wrote: > >> :tabe expected.txt > >> :vert diffs output.txt > > > >> When I last viewed those files, I may have exited with the cursor > >> on the last line. I use the code from ":help restore

Re: Diff should indicate if no differences detected

2016-08-28 Fir de Conversatie JohnBeckett
On Sunday, August 28, 2016 at 8:05:29 PM UTC+10, toothpik wrote: >> :tabe expected.txt >> :vert diffs output.txt > >> When I last viewed those files, I may have exited with the cursor >> on the last line. I use the code from ":help restore-cursor" to >> restore the cursor position, so the diff show

Re: Diff should indicate if no differences detected

2016-08-28 Fir de Conversatie toothpik
On Sat, Aug 27, 2016 at 08:32:09PM -0700, JohnBeckett wrote: > Bram recently fixed :diffoff! > https://groups.google.com/forum/#!topic/vim_dev/h1nREhhF7mY > That reminds me of a diff frustration. > Suppose I have two files expected.txt and output.txt, each over 1000 > lines. Running a test progra

Re: Diff should indicate if no differences detected

2016-08-27 Fir de Conversatie Manuel Ortega
On Sat, Aug 27, 2016 at 11:32 PM, JohnBeckett wrote: > Bram recently fixed :diffoff! > https://groups.google.com/forum/#!topic/vim_dev/h1nREhhF7mY > > That reminds me of a diff frustration. > > Suppose I have two files expected.txt and output.txt, each over 1000 > lines. Running a test program cr

Diff should indicate if no differences detected

2016-08-27 Fir de Conversatie JohnBeckett
Bram recently fixed :diffoff! https://groups.google.com/forum/#!topic/vim_dev/h1nREhhF7mY That reminds me of a diff frustration. Suppose I have two files expected.txt and output.txt, each over 1000 lines. Running a test program creates the second file, and it should be the same as the first. I