Commit Graph

184 Commits

Author SHA1 Message Date
emilis ce611b8283 fixed unwraps on nones occuring on fast subsequent reads in async (+rustfmt) 2023-01-24 12:51:31 +00:00
Jeremy Soller 794ba8fc23
Revert "Merge branch 'master' into 'master'"
This reverts commit d96c13560c, reversing
changes made to 583bb40f32.
2022-10-21 10:01:50 -06:00
Jeremy Soller 0082c8da04 Merge branch 'rawterminal-alternatescreen-errors' into 'master'
Improve error handling in the `raw` and `screen` modules

See merge request redox-os/termion!178
2022-10-21 07:09:08 +00:00
Jeremy Soller d96c13560c Merge branch 'master' into 'master'
Added Ctrl/Alt/Shift+Navigation key support

Closes #183 and #169

See merge request redox-os/termion!175
2022-10-21 07:07:26 +00:00
Jeremy Soller 583bb40f32 Merge branch 'add-serde' into 'master'
1.6.0 - add optional serde implementations

See merge request redox-os/termion!176
2022-10-21 06:55:35 +00:00
Jeremy Soller 4f90d4f69e Merge branch 'desc-tweak' into 'master'
tweak description of terminal_size_pixels() to fit in with the rest

See merge request redox-os/termion!169
2022-10-21 06:52:05 +00:00
Jeremy Soller dfdc5e95a0 Merge branch 'mouseterm' into 'master'
Added AsRawFd impl to MouseTerminal

See merge request redox-os/termion!172
2022-10-21 06:50:33 +00:00
Jeremy Soller 557f7a4e6f Merge branch 'master' into 'master'
Annotate the tuple returned by terminal_size()

See merge request redox-os/termion!179
2022-10-21 06:47:13 +00:00
Luqman Aden 4fafb44f89 Use constants from libc instead of magic numbers. 2021-09-27 07:43:32 -07:00
Luqman Aden 234af89ffb Use libc bindings instead of manual extern blocks to take advantage of platform wrappers in libc crate. 2021-09-27 07:39:06 -07:00
Andreas Blum 1d185e7cab use raw identifier syntax for mod 'async' as it is a keyword since 2018 edition 2021-09-14 22:02:52 +02:00
Richard Bradshaw d6f42c9d61 Annotate the tuple
Make clear that the tuple is (columns, rows).
2021-06-26 18:13:37 +01:00
Lassi Pulkkinen 5d08b65b57
Improve error handling in the `raw` and `screen` modules
- Ignore errors in `Drop` implementations.
- Replace `AlternateScreen::from` with an `IntoAlternateScreen` trait
  which doesn't panic on errors, to make the API more consistent with
  the `raw` module.
2021-06-09 00:28:24 +03:00
Brooks J Rady f094c38d18 1.6.0 - add optional serde implementations 2021-02-16 21:57:41 +00:00
Sebastian Egbers d57468cdc1
Added Ctrl/Alt/Shift+Navigation key support. 2020-10-16 11:26:49 +02:00
zethra 51a2ebbc73 Added AsRawFd impl to MouseTerminal 2020-07-03 03:06:11 -04:00
zethra c471ab6811 Added AsRawFd impl for RawTerminal 2020-06-26 03:31:48 -04:00
rabite 0e905906d4 tweak description of terminal_size_pixels() to fit in with the rest 2020-05-22 01:09:02 +02:00
Jeremy Soller a448f510f0
1.5.5 - fix warnings 2020-01-20 11:12:03 -07:00
Jeremy Soller 6cb4e3fb75 Merge branch 'cursor-style' into 'master'
feature: changing cursor style

See merge request redox-os/termion!164
2020-01-20 18:04:14 +00:00
Jeremy Soller 24e51d01dd Merge branch 'remove-warnings' into 'master'
fix warnings

See merge request redox-os/termion!165
2020-01-20 18:03:53 +00:00
lilydjwg 67fe54119b Avoid allocating temporary Strings in Display implementations 2020-01-18 13:49:20 +08:00
akitsu-sanae a1c43eec08 fix warnings 2019-07-21 01:08:09 +09:00
akitsu-sanae cb16464375 feature: changing cursor style 2019-07-19 05:25:25 +09:00
Jeremy Soller c27678efc2 Merge branch 'bubble-read-errors' into 'master'
Make the keys return their inner error, if any.

See merge request redox-os/termion!162
2019-07-09 01:56:22 +00:00
rabite0 574f863676 Add terminal_size_pixels() to expose terminal's pixel size 2019-07-06 18:08:57 +00:00
Xavier L'Heureux e81a1c4cfc Make the keys return their inner error, if any. For example, when permission to access the TTY is denied, don't loop infinitely and instead return to the outer scope to error and exit (or not) there. 2019-06-26 18:48:53 +00:00
Jeremy Soller 68d765305c Merge branch 'backtab' into 'master'
Backtab key

See merge request redox-os/termion!157
2019-06-12 23:12:12 +00:00
Michael Bradshaw 1c936ca06c Use stdout to get and set terminal attributes 2019-06-12 22:59:41 +00:00
Jeremy Soller a69af17888
Support redox target os with unix target family 2019-04-21 16:57:34 -06:00
Ophir LOJKINE d3a7878fb4 Make Color extend Debug 2019-03-11 13:58:35 +01:00
scauligi 7f81389fc8 backtab key 2019-02-19 23:58:19 -08:00
Matthias Devlamynck 5301d8621a Merge remote-tracking branch 'origin/master' 2019-01-28 19:55:09 +01:00
Michael Neumann 0837ad5ab1 Fix TIOCGWINSZ type mismatch on DragonFly
Below is the error message I got before this patch:

    error[E0308]: mismatched types
      --> src/sys/unix/size.rs:17:34
       |
    17 |         cvt(ioctl(STDOUT_FILENO, TIOCGWINSZ, &mut size as *mut _))?;
       |                                  ^^^^^^^^^^ expected u64, found u32
    help: you can cast an `u32` to `u64`, which will zero-extend the source value
       |
    17 |         cvt(ioctl(STDOUT_FILENO, TIOCGWINSZ.into(), &mut size as *mut _))?;
       |                                  ^^^^^^^^^^^^^^^^^
2018-12-29 13:30:22 +01:00
Nathan Lilienthal b64b10f40b Add ability to suspend/activate raw mode on RawTerminal 2018-10-12 01:40:18 -04:00
Michael Aaron Murphy acd94a3625 Extra derives & performance optimizations 2018-08-20 22:11:58 +00:00
Josh Mcguigan a29929ee34 Corrected all remaining build warnings 2018-05-08 17:34:43 -07:00
Daniel Mueller b9881e122a Remove unused import of std::ascii::AsciiExt (#142)
The import of std::ascii::AsciiExt in src/event.rs is unused. Remove it.

> warning: unused import: `std::ascii::AsciiExt`
>  --> src/event.rs:4:5
>   |
> 4 | use std::ascii::AsciiExt;
>   |     ^^^^^^^^^^^^^^^^^^^^
>   |
>   = note: #[warn(unused_imports)] on by default
2018-05-08 17:31:47 -07:00
Daniel Mueller 047cbc0cab Remove unused 'mut' qualifier in src/input.rs (#143)
This change removes an unused 'mut' qualifier of the 'source' variable
in src/input.rs.

> warning: variable does not need to be mutable
>   --> src/input.rs:52:13
>    |
> 52 |         let mut source = &mut self.source;
>    |             ----^^^^^^
>    |             |
>    |             help: remove this `mut`
>    |
>    = note: #[warn(unused_mut)] on by default
2018-05-08 17:30:31 -07:00
Josh Mcguigan 3cb1bd4b57
Merge pull request #145 from JoshMcguigan/master
Fix detect cursor position reading extra byte
2018-05-08 04:40:57 -07:00
Josh Mcguigan 17fdd50823 Added async_stdin_until function to be used in cursor_pos 2018-05-07 17:13:55 -07:00
Robert Metcalf 7d97b6424f Update references to repository 2018-05-07 01:41:46 +01:00
Niv Kaminer 00f87e5ed8 use `TIOCGWINSZ` directly from `libc` 2017-10-11 13:06:09 +03:00
Jeremy Soller 18e589b9d9 Add cursor position save/restore 2017-08-02 20:07:37 -06:00
Jeremy Soller cd455e8358 Move system specific features into sys module 2017-07-31 21:17:47 -06:00
Jeremy Soller da9a604c40 Update tty.rs 2017-07-27 07:00:48 -06:00
Jeremy Soller 5fdabb4320 Implement size and is_tty with termios on Redox 2017-07-23 11:38:47 -06:00
ftilde 2f97c69a5c Add EventsAndRaw iter and implement it for Read
- In addition to Events it preserves the byte sequence that created an event. This
  is useful, e.g., for implementing a terminal multiplexer where the raw input
  should in some cases be passed on to another tty.
- In order to ensure backwards compatibility, the function that creates the trait
  is implemented in a separate extension trait.
2017-07-13 01:30:44 +02:00
Matthias Devlamynck c26d2f0a97 Implement hide cursor wrapper type 2017-07-11 10:29:28 +02:00
Jeremy Soller 75b28bab55 Fix raw mode on Redox 2017-06-08 18:47:12 -06:00