Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
termion
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
redox-os
termion
Commits
bf33c16c
Commit
bf33c16c
authored
8 years ago
by
ticki
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Revert "True terminal restoration"
parent
0e0b5be8
Branches
revert-66-master
No related tags found
1 merge request
!67
Revert "True terminal restoration"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/raw.rs
+1
-4
1 addition, 4 deletions
src/raw.rs
with
1 addition
and
4 deletions
src/raw.rs
+
1
−
4
View file @
bf33c16c
...
@@ -54,8 +54,6 @@ pub struct RawTerminal<W: Write> {
...
@@ -54,8 +54,6 @@ pub struct RawTerminal<W: Write> {
#[cfg(not(target_os
=
"redox"
))]
#[cfg(not(target_os
=
"redox"
))]
impl
<
W
:
Write
>
Drop
for
RawTerminal
<
W
>
{
impl
<
W
:
Write
>
Drop
for
RawTerminal
<
W
>
{
fn
drop
(
&
mut
self
)
{
fn
drop
(
&
mut
self
)
{
write!
(
self
,
csi!
(
"r"
))
.unwrap
();
write!
(
self
,
csi!
(
"?1049l"
))
.unwrap
();
use
termios
::
set_terminal_attr
;
use
termios
::
set_terminal_attr
;
set_terminal_attr
(
&
mut
self
.prev_ios
as
*
mut
_
);
set_terminal_attr
(
&
mut
self
.prev_ios
as
*
mut
_
);
}
}
...
@@ -102,7 +100,7 @@ pub trait IntoRawMode: Write + Sized {
...
@@ -102,7 +100,7 @@ pub trait IntoRawMode: Write + Sized {
impl
<
W
:
Write
>
IntoRawMode
for
W
{
impl
<
W
:
Write
>
IntoRawMode
for
W
{
#[cfg(not(target_os
=
"redox"
))]
#[cfg(not(target_os
=
"redox"
))]
fn
into_raw_mode
(
mut
self
)
->
io
::
Result
<
RawTerminal
<
W
>>
{
fn
into_raw_mode
(
self
)
->
io
::
Result
<
RawTerminal
<
W
>>
{
use
termios
::{
cfmakeraw
,
get_terminal_attr
,
set_terminal_attr
};
use
termios
::{
cfmakeraw
,
get_terminal_attr
,
set_terminal_attr
};
let
(
mut
ios
,
exit
)
=
get_terminal_attr
();
let
(
mut
ios
,
exit
)
=
get_terminal_attr
();
...
@@ -118,7 +116,6 @@ impl<W: Write> IntoRawMode for W {
...
@@ -118,7 +116,6 @@ impl<W: Write> IntoRawMode for W {
if
set_terminal_attr
(
&
mut
ios
as
*
mut
_
)
!=
0
{
if
set_terminal_attr
(
&
mut
ios
as
*
mut
_
)
!=
0
{
Err
(
io
::
Error
::
new
(
io
::
ErrorKind
::
Other
,
"Unable to set Termios attribute."
))
Err
(
io
::
Error
::
new
(
io
::
ErrorKind
::
Other
,
"Unable to set Termios attribute."
))
}
else
{
}
else
{
write!
(
self
,
csi!
(
"?1049h"
))
.unwrap
();
let
res
=
RawTerminal
{
let
res
=
RawTerminal
{
prev_ios
:
prev_ios
,
prev_ios
:
prev_ios
,
output
:
self
,
output
:
self
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment