typr 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/browser.rb +13 -2
- data/lib/terminal.rb +1 -0
- data/typr.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f04e1f9234a97079a70786d6a427c7c6394775515c78a19feee8e17e3dc1370e
|
|
4
|
+
data.tar.gz: b82771f5976e12fabbd56446d347ac8f49739e41d4dbe089b7ffc5738938dd17
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 99278addeb2d176281564448ddb5b34de23aebb1bac5a3e186c0a4735aafad0387274100bd38fa33018988d7672a7959c6c9791fd2bb8bf50c2e2545075552c6
|
|
7
|
+
data.tar.gz: 9efd4720c0cc7c58f41acf31ca8a38827300127b72ffadaf9d18ebd53b8be0500f53de1386eed6255149f858ab3e5a943523ba79630cadf11eddf8c0f8a6e072
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [v1.5.1] — 2026-09-11
|
|
4
|
+
|
|
3
5
|
## [v1.5.0] — 2026-09-05
|
|
4
6
|
|
|
5
7
|
### Added
|
|
@@ -21,6 +23,8 @@
|
|
|
21
23
|
- `Text#build` wraps ANSI-colored content correctly — the capacity calculation uses display width instead of byte length, so escape sequences don't inflate the line count
|
|
22
24
|
- `reset_view` reloads the directory again — it calls `cd @directory` before clearing display/selection/position and re-sorting, so reset picks up new and removed files instead of only reshuffling the stale listing
|
|
23
25
|
- Head path lookup — `@head.path_at(x, y)` maps a click to a target directory: the username column returns the resolved home directory, each `/`-separated segment of the directory cell returns that ancestor path (padding, action columns and array listings return nil); mouse `x` is adjusted from 1-based terminal columns so boundary clicks resolve to the cell under the cursor
|
|
26
|
+
- `Mouse#alt?` — reports the SGRmeta bit, so callers can treat Alt+click like a right-click (e.g. opening a command list where right-click is hard to send, as on Termux touchscreens)
|
|
27
|
+
- `cd` survives unreadable directories — `chdir` and the listing are probed before any state changes, so `EACCES`/`ENOENT` (e.g. Android's `/data`) shows a warning and stays put instead of crashing on an emptied listing; returns `false` on failure
|
|
24
28
|
|
|
25
29
|
## [v1.4.0] — 2026-08-15
|
|
26
30
|
|
data/lib/browser.rb
CHANGED
|
@@ -58,11 +58,22 @@ module Typr
|
|
|
58
58
|
return unless dir
|
|
59
59
|
data, missing = [],{}
|
|
60
60
|
unless append
|
|
61
|
+
begin
|
|
62
|
+
path = File.expand_path( dir )
|
|
63
|
+
Dir.chdir( path )
|
|
64
|
+
entries = Dir.new( path ).children
|
|
65
|
+
rescue SystemCallError
|
|
66
|
+
@user.show "cannot open directory: #{dir}"
|
|
67
|
+
Typr.read_key
|
|
68
|
+
return false
|
|
69
|
+
end
|
|
61
70
|
@colors[:fields] = {}
|
|
62
71
|
clear
|
|
63
|
-
|
|
72
|
+
@directory = path
|
|
73
|
+
else
|
|
74
|
+
entries = Dir.new( @directory ).children
|
|
64
75
|
end
|
|
65
|
-
data =
|
|
76
|
+
data = entries.reject{|f|
|
|
66
77
|
!@show_hidden and f[0] == ?. }.map { |file| scan_file file }
|
|
67
78
|
|
|
68
79
|
data.each_with_index{ |row, id|
|
data/lib/terminal.rb
CHANGED
|
@@ -76,6 +76,7 @@ module Typr
|
|
|
76
76
|
def left?; button == 0 end
|
|
77
77
|
def middle?; button == 1 end
|
|
78
78
|
def right?; button == 2 end
|
|
79
|
+
def alt?; ( modifiers & 8 ) != 0 end
|
|
79
80
|
def to_s; "%s button=%i x=%i y=%i%s" % [ action, button, x, y,
|
|
80
81
|
( modifiers > 0 ? " modifiers=#{modifiers}" : "" ) ] end
|
|
81
82
|
end
|
data/typr.gemspec
CHANGED