Skip to content

Commit 52d8ab6

Browse files
committed
Updated to use dialogs from latest Textadept hg.
1 parent d50402b commit 52d8ab6

File tree

2 files changed

+6
-17
lines changed

2 files changed

+6
-17
lines changed

README.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ even if one buffer has a change and the other does not (additions or deletions).
3333

3434
## Key Bindings
3535

36-
Windows, Linux, BSD | macOS | Terminal | Command
36+
Windows and Linux | macOS | Terminal | Command
3737
-|-|-|-
3838
**Tools**| | |
3939
F6 | F6 | F6 | Compare files...
@@ -71,15 +71,6 @@ The marker for line deletions.
7171

7272
The marker for line modifications.
7373

74-
<a id="file_diff.theme"></a>
75-
### `file_diff.theme` (string)
76-
77-
The theme to use, either 'dark' or 'light'.
78-
This is not the theme used with Textadept. Depending on this setting, additions will be
79-
colored 'dark_green' or 'light_green', deletions will be colored 'dark_red' or 'light_red',
80-
and so on.
81-
The default value is auto-detected.
82-
8374

8475
## Functions defined by `file_diff`
8576

init.lua

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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
295295
function 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

Comments
 (0)