@@ -37,7 +37,7 @@ local M = {}
3737--
3838-- ### Key Bindings
3939--
40- -- Windows, Linux, BSD | macOS | Terminal | Command
40+ -- Windows and Linux | macOS | Terminal | Command
4141-- -|-|-|-
4242-- **Tools**| | |
4343-- F6 | F6 | F6 | Compare files...
@@ -293,16 +293,14 @@ local starting_diff = false
293293-- default value is `false`, comparing the two files side-by-side.
294294-- @name start
295295function M .start (file1 , file2 , horizontal )
296- file1 = file1 or ui .dialogs .fileselect {
296+ file1 = file1 or ui .dialogs .open {
297297 title = _L [' Select the first file to compare' ],
298- with_directory = (buffer .filename or ' ' ):match (' ^.+[/\\ ]' ) or lfs .currentdir (),
299- width = CURSES and ui .size [1 ] - 2 or nil
298+ dir = (buffer .filename or ' ' ):match (' ^.+[/\\ ]' ) or lfs .currentdir ()
300299 }
301300 if not file1 then return end
302- file2 = file2 or ui .dialogs .fileselect {
301+ file2 = file2 or ui .dialogs .open {
303302 title = string.format (' %s %s' , _L [' Select the file to compare to' ], file1 :match (' [^/\\ ]+$' )),
304- with_directory = file1 :match (' ^.+[/\\ ]' ) or lfs .currentdir (),
305- width = CURSES and ui .size [1 ] - 2 or nil
303+ dir = file1 :match (' ^.+[/\\ ]' ) or lfs .currentdir ()
306304 }
307305 if not file2 then return end
308306 starting_diff = true
0 commit comments