tty-screen 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/tty/screen.rb +3 -2
- data/lib/tty/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13ab3e4f54a6a88eadd469eaf26d752bd4c8cfad
|
4
|
+
data.tar.gz: c3110f1d2d7fefa2996fed29fae0245b4094d5ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a713c42dbb3f64ab6c1063141c812592687f28e9620641b17a4882c1a123c1b4b5f3089371ffca5c1e8db68255d23631ce9eae788b0136ec52bb5593598c27d
|
7
|
+
data.tar.gz: dac5190985f60f3049f41db637ee83802ed0fd996c7c266ed2d2affc766dcd3520cc1e594b08cf1301a02e6d1088bd0c5ecc7f818550e1aa2cf9f23dfb64cc1c
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Change log
|
2
2
|
|
3
|
+
## [v0.6.2] - 2017-11-04
|
4
|
+
|
5
|
+
### Fixed
|
6
|
+
* Fix #size_from_java to provide size only for non-zero values
|
7
|
+
* Fix #size_from_ioctl to provide size only for non-zero values
|
8
|
+
|
3
9
|
## [v0.6.1] - 2017-10-29
|
4
10
|
|
5
11
|
### Fixed
|
@@ -76,6 +82,7 @@
|
|
76
82
|
### Fixed
|
77
83
|
* Fix bug with screen detection from_io_console by @luxflux
|
78
84
|
|
85
|
+
[v0.6.2]: https://github.com/peter-murach/tty-screen/compare/v0.6.1...v0.6.2
|
79
86
|
[v0.6.1]: https://github.com/peter-murach/tty-screen/compare/v0.6.0...v0.6.1
|
80
87
|
[v0.6.0]: https://github.com/peter-murach/tty-screen/compare/v0.5.1...v0.6.0
|
81
88
|
[v0.5.1]: https://github.com/peter-murach/tty-screen/compare/v0.5.0...v0.5.1
|
data/lib/tty/screen.rb
CHANGED
@@ -112,7 +112,8 @@ module TTY
|
|
112
112
|
require 'java'
|
113
113
|
java_import 'jline.TerminalFactory'
|
114
114
|
terminal = TerminalFactory.get
|
115
|
-
[terminal.get_height, terminal.get_width]
|
115
|
+
size = [terminal.get_height, terminal.get_width]
|
116
|
+
return size if nonzero_column?(size[1])
|
116
117
|
rescue
|
117
118
|
warn 'failed to import java terminal package' if verbose
|
118
119
|
end
|
@@ -160,7 +161,7 @@ module TTY
|
|
160
161
|
buffer = ([0] * format.size).pack(format)
|
161
162
|
if ioctl?(TIOCGWINSZ, buffer) || ioctl?(TIOCGWINSZ_PPC, buffer)
|
162
163
|
rows, cols, = buffer.unpack(format)[0..1]
|
163
|
-
return [rows, cols]
|
164
|
+
return [rows, cols] if nonzero_column?(cols)
|
164
165
|
end
|
165
166
|
end
|
166
167
|
module_function :size_from_ioctl
|
data/lib/tty/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tty-screen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Murach
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|