added alternate screen for unix working on raw screen featuresbash: wq: command not found

This commit is contained in:
= 2018-06-13 21:02:09 +02:00
parent 3878993459
commit 48a429a396
24 changed files with 803 additions and 638 deletions

View File

@ -2,30 +2,29 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="310aeab2-4737-4e8e-b7eb-0aac10d104a3" name="Default" comment=""> <list default="true" id="310aeab2-4737-4e8e-b7eb-0aac10d104a3" name="Default" comment="">
<change beforePath="" afterPath="$PROJECT_DIR$/src/shared/raw.rs" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change beforePath="$PROJECT_DIR$/Cargo.toml" afterPath="$PROJECT_DIR$/Cargo.toml" /> <change beforePath="$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/bin.rs" afterPath="$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/bin.rs" />
<change beforePath="$PROJECT_DIR$/examples/Crossterm 0.2.1/terminal/alternate_screen.rs" afterPath="" /> <change beforePath="$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/terminal/alternate_screen.rs" afterPath="$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/terminal/alternate_screen.rs" />
<change beforePath="$PROJECT_DIR$/examples/Crossterm 0.2.1/terminal/raw_mode.rs" afterPath="" /> <change beforePath="$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/terminal/mod.rs" afterPath="$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/terminal/mod.rs" />
<change beforePath="$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/color/mod.rs" afterPath="$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/color/mod.rs" /> <change beforePath="$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/terminal/raw_mode.rs" afterPath="$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/terminal/raw_mode.rs" />
<change beforePath="$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/terminal/terminal.rs" afterPath="$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/terminal/terminal.rs" />
<change beforePath="$PROJECT_DIR$/src/cursor/ansi_cursor.rs" afterPath="$PROJECT_DIR$/src/cursor/ansi_cursor.rs" /> <change beforePath="$PROJECT_DIR$/src/cursor/ansi_cursor.rs" afterPath="$PROJECT_DIR$/src/cursor/ansi_cursor.rs" />
<change beforePath="$PROJECT_DIR$/src/cursor/cursor.rs" afterPath="$PROJECT_DIR$/src/cursor/cursor.rs" />
<change beforePath="$PROJECT_DIR$/src/cursor/mod.rs" afterPath="$PROJECT_DIR$/src/cursor/mod.rs" />
<change beforePath="$PROJECT_DIR$/src/kernel/unix_kernel/terminal.rs" afterPath="$PROJECT_DIR$/src/kernel/unix_kernel/terminal.rs" /> <change beforePath="$PROJECT_DIR$/src/kernel/unix_kernel/terminal.rs" afterPath="$PROJECT_DIR$/src/kernel/unix_kernel/terminal.rs" />
<change beforePath="$PROJECT_DIR$/src/lib.rs" afterPath="$PROJECT_DIR$/src/lib.rs" />
<change beforePath="$PROJECT_DIR$/src/manager/ansi_manager.rs" afterPath="$PROJECT_DIR$/src/manager/ansi_manager.rs" /> <change beforePath="$PROJECT_DIR$/src/manager/ansi_manager.rs" afterPath="$PROJECT_DIR$/src/manager/ansi_manager.rs" />
<change beforePath="$PROJECT_DIR$/src/manager/manager.rs" afterPath="$PROJECT_DIR$/src/manager/manager.rs" /> <change beforePath="$PROJECT_DIR$/src/manager/manager.rs" afterPath="$PROJECT_DIR$/src/manager/manager.rs" />
<change beforePath="$PROJECT_DIR$/src/manager/mod.rs" afterPath="$PROJECT_DIR$/src/manager/mod.rs" /> <change beforePath="$PROJECT_DIR$/src/manager/mod.rs" afterPath="$PROJECT_DIR$/src/manager/mod.rs" />
<change beforePath="$PROJECT_DIR$/src/manager/terminal.rs" afterPath="$PROJECT_DIR$/src/manager/terminal.rs" /> <change beforePath="$PROJECT_DIR$/src/manager/terminal.rs" afterPath="$PROJECT_DIR$/src/shared/terminal.rs" />
<change beforePath="$PROJECT_DIR$/src/shared/functions.rs" afterPath="$PROJECT_DIR$/src/shared/functions.rs" /> <change beforePath="$PROJECT_DIR$/src/shared/mod.rs" afterPath="$PROJECT_DIR$/src/shared/mod.rs" />
<change beforePath="$PROJECT_DIR$/src/state/commands/mod.rs" afterPath="$PROJECT_DIR$/src/state/commands/mod.rs" />
<change beforePath="$PROJECT_DIR$/src/state/commands/shared_commands.rs" afterPath="$PROJECT_DIR$/src/state/commands/shared_commands.rs" /> <change beforePath="$PROJECT_DIR$/src/state/commands/shared_commands.rs" afterPath="$PROJECT_DIR$/src/state/commands/shared_commands.rs" />
<change beforePath="$PROJECT_DIR$/src/state/commands/unix_command.rs" afterPath="$PROJECT_DIR$/src/state/commands/unix_command.rs" />
<change beforePath="$PROJECT_DIR$/src/state/commands/win_commands.rs" afterPath="$PROJECT_DIR$/src/state/commands/win_commands.rs" />
<change beforePath="$PROJECT_DIR$/src/state/context.rs" afterPath="$PROJECT_DIR$/src/state/context.rs" /> <change beforePath="$PROJECT_DIR$/src/state/context.rs" afterPath="$PROJECT_DIR$/src/state/context.rs" />
<change beforePath="$PROJECT_DIR$/src/style/color/ansi_color.rs" afterPath="$PROJECT_DIR$/src/style/color/ansi_color.rs" />
<change beforePath="$PROJECT_DIR$/src/style/color/color.rs" afterPath="$PROJECT_DIR$/src/style/color/color.rs" />
<change beforePath="$PROJECT_DIR$/src/style/color/mod.rs" afterPath="$PROJECT_DIR$/src/style/color/mod.rs" />
<change beforePath="$PROJECT_DIR$/src/style/styles/objectstyle.rs" afterPath="$PROJECT_DIR$/src/style/styles/objectstyle.rs" />
<change beforePath="$PROJECT_DIR$/src/style/styles/styledobject.rs" afterPath="$PROJECT_DIR$/src/style/styles/styledobject.rs" />
<change beforePath="$PROJECT_DIR$/src/terminal/ansi_terminal.rs" afterPath="$PROJECT_DIR$/src/terminal/ansi_terminal.rs" />
<change beforePath="$PROJECT_DIR$/src/terminal/mod.rs" afterPath="$PROJECT_DIR$/src/terminal/mod.rs" /> <change beforePath="$PROJECT_DIR$/src/terminal/mod.rs" afterPath="$PROJECT_DIR$/src/terminal/mod.rs" />
<change beforePath="$PROJECT_DIR$/src/terminal/screen.rs" afterPath="$PROJECT_DIR$/src/terminal/screen.rs" /> <change beforePath="$PROJECT_DIR$/src/terminal/raw.rs" afterPath="" />
<change beforePath="$PROJECT_DIR$/src/terminal/screen.rs" afterPath="$PROJECT_DIR$/src/shared/screen.rs" />
<change beforePath="$PROJECT_DIR$/src/terminal/terminal.rs" afterPath="$PROJECT_DIR$/src/terminal/terminal.rs" /> <change beforePath="$PROJECT_DIR$/src/terminal/terminal.rs" afterPath="$PROJECT_DIR$/src/terminal/terminal.rs" />
</list> </list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@ -36,7 +35,111 @@
<option name="LAST_RESOLUTION" value="IGNORE" /> <option name="LAST_RESOLUTION" value="IGNORE" />
</component> </component>
<component name="FileEditorManager"> <component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300" /> <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="alternate_screen.rs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/terminal/alternate_screen.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1456">
<caret line="56" column="7" lean-forward="false" selection-start-line="56" selection-start-column="7" selection-end-line="56" selection-end-column="7" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="raw_mode.rs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/terminal/raw_mode.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="604">
<caret line="53" column="0" lean-forward="false" selection-start-line="53" selection-start-column="0" selection-end-line="53" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="raw.rs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/shared/raw.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="500">
<caret line="94" column="4" lean-forward="false" selection-start-line="94" selection-start-column="4" selection-end-line="94" selection-end-column="4" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="context.rs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/state/context.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="474">
<caret line="55" column="26" lean-forward="false" selection-start-line="55" selection-start-column="26" selection-end-line="55" selection-end-column="26" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="macros.rs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/shared/macros.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="52">
<caret line="2" column="13" lean-forward="false" selection-start-line="2" selection-start-column="13" selection-end-line="2" selection-end-column="13" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="terminal.rs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/shared/terminal.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="296">
<caret line="14" column="8" lean-forward="false" selection-start-line="14" selection-start-column="8" selection-end-line="14" selection-end-column="8" />
<folding>
<element signature="e#488#1011#0" expanded="false" />
<element signature="e#1152#2177#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="unix_command.rs" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/state/commands/unix_command.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="292">
<caret line="101" column="27" lean-forward="false" selection-start-line="101" selection-start-column="27" selection-end-line="101" selection-end-column="27" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="lib.rs" pinned="false" current-in-tab="false">
<entry file="file://$USER_HOME$/.cargo/registry/src/github.com-1ecc6299db9ec823/termios-0.3.0/src/lib.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="296">
<caret line="170" column="11" lean-forward="false" selection-start-line="170" selection-start-column="11" selection-end-line="170" selection-end-column="11" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Cargo.toml" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Cargo.toml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="287">
<caret line="13" column="14" lean-forward="false" selection-start-line="13" selection-start-column="14" selection-end-line="13" selection-end-column="14" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="terminal.rs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/kernel/unix_kernel/terminal.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="366">
<caret line="86" column="31" lean-forward="false" selection-start-line="86" selection-start-column="31" selection-end-line="86" selection-end-column="31" />
<folding />
</state>
</provider>
</entry>
</file>
</leaf>
</component> </component>
<component name="FileTemplateManagerImpl"> <component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES"> <option name="RECENT_TEMPLATES">
@ -60,7 +163,6 @@
<find>return</find> <find>return</find>
<find>crossterm_</find> <find>crossterm_</find>
<find>clear</find> <find>clear</find>
<find>context</find>
<find>self.</find> <find>self.</find>
<find>output</find> <find>output</find>
<find>std</find> <find>std</find>
@ -72,11 +174,12 @@
<find>command</find> <find>command</find>
<find>Context</find> <find>Context</find>
<find>End</find> <find>End</find>
<find>terminal</find>
<find>termina</find> <find>termina</find>
<find>screen</find> <find>screen</find>
<find>colored_terminal</find> <find>colored_terminal</find>
<find>ObjectStyle</find> <find>ObjectStyle</find>
<find>context</find>
<find>terminal</find>
</findStrings> </findStrings>
<replaceStrings> <replaceStrings>
<replace>crossterm_cursor</replace> <replace>crossterm_cursor</replace>
@ -102,13 +205,6 @@
<component name="IdeDocumentHistory"> <component name="IdeDocumentHistory">
<option name="CHANGED_PATHS"> <option name="CHANGED_PATHS">
<list> <list>
<option value="$PROJECT_DIR$/src/kernel/windows_kernel/cursor.rs" />
<option value="$PROJECT_DIR$/src/crossterm_state/commands/win_commands.rs" />
<option value="$PROJECT_DIR$/src/crossterm_state/context.rs" />
<option value="$PROJECT_DIR$/src/crossterm_terminal/screen/mod.rs" />
<option value="$PROJECT_DIR$/src/crossterm_terminal/raw_terminal.rs" />
<option value="$PROJECT_DIR$/src/crossterm_terminal/raw.rs" />
<option value="$PROJECT_DIR$/examples/color/mod.rs" />
<option value="$PROJECT_DIR$/src/terminal/winapi_terminal.rs" /> <option value="$PROJECT_DIR$/src/terminal/winapi_terminal.rs" />
<option value="$PROJECT_DIR$/src/kernel/windows_kernel/ansi_support.rs" /> <option value="$PROJECT_DIR$/src/kernel/windows_kernel/ansi_support.rs" />
<option value="$PROJECT_DIR$/examples/terminal/raw_mode.rs" /> <option value="$PROJECT_DIR$/examples/terminal/raw_mode.rs" />
@ -119,14 +215,7 @@
<option value="$PROJECT_DIR$/src/manager/win_manager.rs" /> <option value="$PROJECT_DIR$/src/manager/win_manager.rs" />
<option value="$PROJECT_DIR$/src/kernel/mod.rs" /> <option value="$PROJECT_DIR$/src/kernel/mod.rs" />
<option value="$PROJECT_DIR$/examples/terminal/mod.rs" /> <option value="$PROJECT_DIR$/examples/terminal/mod.rs" />
<option value="$PROJECT_DIR$/src/shared/terminal.rs" />
<option value="$PROJECT_DIR$/src/shared/mod.rs" />
<option value="$PROJECT_DIR$/src/lib.rs" />
<option value="$PROJECT_DIR$/src/state/commands/mod.rs" />
<option value="$PROJECT_DIR$/src/state/commands/win_commands.rs" />
<option value="$PROJECT_DIR$/src/terminal/raw.rs" />
<option value="$PROJECT_DIR$/examples/terminal/terminal.rs" /> <option value="$PROJECT_DIR$/examples/terminal/terminal.rs" />
<option value="$PROJECT_DIR$/src/state/commands/unix_command.rs" />
<option value="$PROJECT_DIR$/examples/bin.rs" /> <option value="$PROJECT_DIR$/examples/bin.rs" />
<option value="$PROJECT_DIR$/examples/cursor/mod.rs" /> <option value="$PROJECT_DIR$/examples/cursor/mod.rs" />
<option value="$PROJECT_DIR$/src/style/mod.rs" /> <option value="$PROJECT_DIR$/src/style/mod.rs" />
@ -134,25 +223,39 @@
<option value="$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/color/mod.rs" /> <option value="$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/color/mod.rs" />
<option value="$PROJECT_DIR$/Cargo.toml" /> <option value="$PROJECT_DIR$/Cargo.toml" />
<option value="$PROJECT_DIR$/src/shared/functions.rs" /> <option value="$PROJECT_DIR$/src/shared/functions.rs" />
<option value="$PROJECT_DIR$/src/state/commands/shared_commands.rs" />
<option value="$PROJECT_DIR$/src/cursor/mod.rs" /> <option value="$PROJECT_DIR$/src/cursor/mod.rs" />
<option value="$PROJECT_DIR$/src/style/color/ansi_color.rs" /> <option value="$PROJECT_DIR$/src/style/color/ansi_color.rs" />
<option value="$PROJECT_DIR$/src/style/color/mod.rs" /> <option value="$PROJECT_DIR$/src/style/color/mod.rs" />
<option value="$PROJECT_DIR$/src/style/styles/objectstyle.rs" /> <option value="$PROJECT_DIR$/src/style/styles/objectstyle.rs" />
<option value="$PROJECT_DIR$/src/terminal/terminal.rs" />
<option value="$PROJECT_DIR$/src/terminal/screen.rs" />
<option value="$PROJECT_DIR$/src/manager/manager.rs" />
<option value="$PROJECT_DIR$/src/manager/terminal.rs" /> <option value="$PROJECT_DIR$/src/manager/terminal.rs" />
<option value="$PROJECT_DIR$/src/manager/mod.rs" />
<option value="$PROJECT_DIR$/src/state/context.rs" />
<option value="$PROJECT_DIR$/src/manager/ansi_manager.rs" />
<option value="$PROJECT_DIR$/src/terminal/mod.rs" />
<option value="$PROJECT_DIR$/src/kernel/unix_kernel/terminal.rs" />
<option value="$PROJECT_DIR$/src/style/color/color.rs" /> <option value="$PROJECT_DIR$/src/style/color/color.rs" />
<option value="$PROJECT_DIR$/src/cursor/cursor.rs" /> <option value="$PROJECT_DIR$/src/cursor/cursor.rs" />
<option value="$PROJECT_DIR$/src/style/styles/styledobject.rs" /> <option value="$PROJECT_DIR$/src/style/styles/styledobject.rs" />
<option value="$PROJECT_DIR$/src/terminal/ansi_terminal.rs" /> <option value="$PROJECT_DIR$/src/terminal/ansi_terminal.rs" />
<option value="$PROJECT_DIR$/src/cursor/ansi_cursor.rs" /> <option value="$PROJECT_DIR$/src/cursor/ansi_cursor.rs" />
<option value="$PROJECT_DIR$/src/terminal/terminal.rs" />
<option value="$PROJECT_DIR$/src/terminal/screen.rs" />
<option value="$PROJECT_DIR$/src/shared/terminal.rs" />
<option value="$PROJECT_DIR$/src/state/commands/win_commands.rs" />
<option value="$PROJECT_DIR$/src/state/commands/mod.rs" />
<option value="$PROJECT_DIR$/src/terminal/raw.rs" />
<option value="$PROJECT_DIR$/src/terminal/mod.rs" />
<option value="$PROJECT_DIR$/src/shared/mod.rs" />
<option value="$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/terminal/mod.rs" />
<option value="$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/terminal/terminal.rs" />
<option value="$PROJECT_DIR$/src/manager/mod.rs" />
<option value="$PROJECT_DIR$/src/state/commands/shared_commands.rs" />
<option value="$PROJECT_DIR$/src/manager/manager.rs" />
<option value="$PROJECT_DIR$/src/manager/ansi_manager.rs" />
<option value="$PROJECT_DIR$/src/shared/screen.rs" />
<option value="$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/terminal/alternate_screen.rs" />
<option value="$PROJECT_DIR$/src/lib.rs" />
<option value="$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/bin.rs" />
<option value="$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/terminal/raw_mode.rs" />
<option value="$PROJECT_DIR$/src/shared/raw.rs" />
<option value="$PROJECT_DIR$/src/kernel/unix_kernel/terminal.rs" />
<option value="$PROJECT_DIR$/src/state/context.rs" />
<option value="$PROJECT_DIR$/src/state/commands/unix_command.rs" />
</list> </list>
</option> </option>
</component> </component>
@ -202,8 +305,8 @@
<foldersAlwaysOnTop value="true" /> <foldersAlwaysOnTop value="true" />
</navigator> </navigator>
<panes> <panes>
<pane id="Scratches" />
<pane id="PackagesPane" /> <pane id="PackagesPane" />
<pane id="Scope" />
<pane id="ProjectPane"> <pane id="ProjectPane">
<subPane> <subPane>
<expand> <expand>
@ -219,13 +322,20 @@
<path> <path>
<item name="crossterm" type="b2602c69:ProjectViewProjectNode" /> <item name="crossterm" type="b2602c69:ProjectViewProjectNode" />
<item name="crossterm" type="462c0819:PsiDirectoryNode" /> <item name="crossterm" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" /> <item name="examples" type="462c0819:PsiDirectoryNode" />
<item name="Crossterm 0.2.2 - New Version (Not finished)" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="crossterm" type="b2602c69:ProjectViewProjectNode" />
<item name="crossterm" type="462c0819:PsiDirectoryNode" />
<item name="examples" type="462c0819:PsiDirectoryNode" />
<item name="Crossterm 0.2.2 - New Version (Not finished)" type="462c0819:PsiDirectoryNode" />
<item name="terminal" type="462c0819:PsiDirectoryNode" />
</path> </path>
<path> <path>
<item name="crossterm" type="b2602c69:ProjectViewProjectNode" /> <item name="crossterm" type="b2602c69:ProjectViewProjectNode" />
<item name="crossterm" type="462c0819:PsiDirectoryNode" /> <item name="crossterm" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" /> <item name="src" type="462c0819:PsiDirectoryNode" />
<item name="cursor" type="462c0819:PsiDirectoryNode" />
</path> </path>
<path> <path>
<item name="crossterm" type="b2602c69:ProjectViewProjectNode" /> <item name="crossterm" type="b2602c69:ProjectViewProjectNode" />
@ -271,13 +381,6 @@
<item name="src" type="462c0819:PsiDirectoryNode" /> <item name="src" type="462c0819:PsiDirectoryNode" />
<item name="style" type="462c0819:PsiDirectoryNode" /> <item name="style" type="462c0819:PsiDirectoryNode" />
</path> </path>
<path>
<item name="crossterm" type="b2602c69:ProjectViewProjectNode" />
<item name="crossterm" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="style" type="462c0819:PsiDirectoryNode" />
<item name="color" type="462c0819:PsiDirectoryNode" />
</path>
<path> <path>
<item name="crossterm" type="b2602c69:ProjectViewProjectNode" /> <item name="crossterm" type="b2602c69:ProjectViewProjectNode" />
<item name="crossterm" type="462c0819:PsiDirectoryNode" /> <item name="crossterm" type="462c0819:PsiDirectoryNode" />
@ -295,22 +398,22 @@
<select /> <select />
</subPane> </subPane>
</pane> </pane>
<pane id="Scope" />
<pane id="AndroidView" /> <pane id="AndroidView" />
<pane id="Scratches" />
</panes> </panes>
</component> </component>
<component name="PropertiesComponent"> <component name="PropertiesComponent">
<property name="SearchEverywhereHistoryKey" value="&#9;FILE&#9;file://D:/Windows/GIT/crossterm/src/crossterm_state/commands/win_commands.rs" /> <property name="SearchEverywhereHistoryKey" value="&#9;FILE&#9;file://D:/Windows/GIT/crossterm/src/crossterm_state/commands/win_commands.rs" />
<property name="WebServerToolWindowFactoryState" value="false" /> <property name="WebServerToolWindowFactoryState" value="false" />
<property name="aspect.path.notification.shown" value="true" /> <property name="aspect.path.notification.shown" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" /> <property name="last_opened_file_path" value="$PROJECT_DIR$/../rust" />
<property name="org.rust.cargo.project.model.PROJECT_DISCOVERY" value="true" /> <property name="org.rust.cargo.project.model.PROJECT_DISCOVERY" value="true" />
<property name="settings.editor.selected.configurable" value="preferences.sourceCode.Rust" /> <property name="settings.editor.selected.configurable" value="preferences.sourceCode.Rust" />
</component> </component>
<component name="RecentsManager"> <component name="RecentsManager">
<key name="MoveFile.RECENT_KEYS"> <key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/src/manager" />
<recent name="$PROJECT_DIR$/src/shared" /> <recent name="$PROJECT_DIR$/src/shared" />
<recent name="$PROJECT_DIR$/src/manager" />
<recent name="D:\Windows\GIT\crossterm\src\crossterm_terminal" /> <recent name="D:\Windows\GIT\crossterm\src\crossterm_terminal" />
<recent name="D:\Windows\GIT\crossterm\src\crossterm_state" /> <recent name="D:\Windows\GIT\crossterm\src\crossterm_state" />
<recent name="D:\Windows\GIT\crossterm\src\shared" /> <recent name="D:\Windows\GIT\crossterm\src\shared" />
@ -504,15 +607,20 @@
<workItem from="1528305149128" duration="8128000" /> <workItem from="1528305149128" duration="8128000" />
<workItem from="1528395000021" duration="4555000" /> <workItem from="1528395000021" duration="4555000" />
<workItem from="1528524165703" duration="4198000" /> <workItem from="1528524165703" duration="4198000" />
<workItem from="1528547275121" duration="20103000" /> <workItem from="1528547275121" duration="20207000" />
<workItem from="1528632802197" duration="5740000" />
<workItem from="1528733714476" duration="6794000" />
<workItem from="1528828385642" duration="3639000" />
<workItem from="1528911713517" duration="4702000" />
</task> </task>
<servers /> <servers />
</component> </component>
<component name="TimeTrackingManager"> <component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="489770000" /> <option name="totallyTimeSpent" value="510749000" />
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="67" y="27" width="2493" height="1055" extended-state="6" /> <frame x="67" y="27" width="2493" height="1055" extended-state="6" />
<editor active="true" />
<layout> <layout>
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
@ -522,26 +630,26 @@
<window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> <window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.27038628" sideWeight="0.503125" order="7" side_tool="true" content_ui="tabs" /> <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.27038628" sideWeight="0.503125" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33722162" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" /> <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33722162" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" /> <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
<window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.162856" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.162856" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="true" content_ui="tabs" /> <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="true" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" /> <window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="true" content_ui="tabs" /> <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="true" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Database Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" /> <window_info id="Database Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" /> <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24181627" sideWeight="0.496875" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.14914162" sideWeight="0.496875" order="1" side_tool="false" content_ui="tabs" />
</layout> </layout>
<layout-to-restore> <layout-to-restore>
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
@ -584,55 +692,6 @@
<watches-manager /> <watches-manager />
</component> </component>
<component name="editorHistoryManager"> <component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/src/kernel/mod.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="182">
<caret line="7" column="0" lean-forward="false" selection-start-line="7" selection-start-column="0" selection-end-line="7" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/examples/terminal/raw_mode.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="48" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/kernel/windows_kernel/terminal.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="182">
<caret line="7" column="1" lean-forward="false" selection-start-line="7" selection-start-column="1" selection-end-line="7" selection-end-column="1" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/result.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="20072">
<caret line="778" column="11" lean-forward="false" selection-start-line="778" selection-start-column="11" selection-end-line="778" selection-end-column="11" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/state/mod.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="15" lean-forward="false" selection-start-line="0" selection-start-column="15" selection-end-line="0" selection-end-column="15" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/shared/mod.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="130">
<caret line="5" column="18" lean-forward="false" selection-start-line="5" selection-start-column="18" selection-end-line="5" selection-end-column="18" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/examples/terminal/mod.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="26">
<caret line="1" column="0" lean-forward="false" selection-start-line="1" selection-start-column="0" selection-end-line="1" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/kernel/windows_kernel/cursor.rs"> <entry file="file://$PROJECT_DIR$/src/kernel/windows_kernel/cursor.rs">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="578"> <state relative-caret-position="578">
@ -647,13 +706,6 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/terminal/raw.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="501">
<caret line="64" column="18" lean-forward="false" selection-start-line="64" selection-start-column="18" selection-end-line="64" selection-end-column="18" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/sync/mutex.rs"> <entry file="file://$USER_HOME$/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/sync/mutex.rs">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="296"> <state relative-caret-position="296">
@ -661,43 +713,13 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/state/commands/mod.rs"> <entry file="file://$PROJECT_DIR$/examples/bin.rs" />
<provider selected="true" editor-type-id="text-editor"> <entry file="file://$PROJECT_DIR$/examples/cursor/mod.rs" />
<state relative-caret-position="317"> <entry file="file://$PROJECT_DIR$/examples/terminal/terminal.rs" />
<caret line="32" column="7" lean-forward="false" selection-start-line="32" selection-start-column="7" selection-end-line="32" selection-end-column="7" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/examples/bin.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="494">
<caret line="19" column="22" lean-forward="false" selection-start-line="19" selection-start-column="22" selection-end-line="19" selection-end-column="22" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/examples/cursor/mod.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="756">
<caret line="105" column="14" lean-forward="false" selection-start-line="92" selection-start-column="4" selection-end-line="105" selection-end-column="14" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/examples/terminal/terminal.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-2568">
<caret line="22" column="31" lean-forward="false" selection-start-line="22" selection-start-column="31" selection-end-line="22" selection-end-column="31" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/shared/traits.rs"> <entry file="file://$PROJECT_DIR$/src/shared/traits.rs">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="338"> <state relative-caret-position="338">
<caret line="13" column="0" lean-forward="false" selection-start-line="13" selection-start-column="0" selection-end-line="13" selection-end-column="0" /> <caret line="13" column="0" lean-forward="false" selection-start-line="13" selection-start-column="0" selection-end-line="13" selection-end-column="0" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
@ -705,15 +727,6 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0"> <state relative-caret-position="0">
<caret line="0" column="4" lean-forward="false" selection-start-line="0" selection-start-column="4" selection-end-line="0" selection-end-column="4" /> <caret line="0" column="4" lean-forward="false" selection-start-line="0" selection-start-column="4" selection-end-line="0" selection-end-column="4" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/shared/macros.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="52">
<caret line="2" column="13" lean-forward="false" selection-start-line="2" selection-start-column="13" selection-end-line="2" selection-end-column="13" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
@ -721,7 +734,6 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="104"> <state relative-caret-position="104">
<caret line="4" column="0" lean-forward="false" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" /> <caret line="4" column="0" lean-forward="false" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
@ -729,109 +741,23 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="702"> <state relative-caret-position="702">
<caret line="27" column="27" lean-forward="false" selection-start-line="27" selection-start-column="27" selection-end-line="27" selection-end-column="27" /> <caret line="27" column="27" lean-forward="false" selection-start-line="27" selection-start-column="27" selection-end-line="27" selection-end-column="27" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/examples/color/mod.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="494">
<caret line="31" column="38" lean-forward="false" selection-start-line="31" selection-start-column="38" selection-end-line="31" selection-end-column="38" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/examples/terminal/alternate_screen.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="473">
<caret line="120" column="30" lean-forward="false" selection-start-line="120" selection-start-column="30" selection-end-line="120" selection-end-column="30" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/examples/color/mod.rs" />
<entry file="file://$PROJECT_DIR$/examples/terminal/alternate_screen.rs" />
<entry file="file://$PROJECT_DIR$/examples/Crossterm 0.2.0/terminal/mod.rs"> <entry file="file://$PROJECT_DIR$/examples/Crossterm 0.2.0/terminal/mod.rs">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0"> <state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/examples/Crossterm 0.2.1/terminal/alternate_screen.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/bin.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="338">
<caret line="13" column="23" lean-forward="false" selection-start-line="13" selection-start-column="23" selection-end-line="13" selection-end-column="23" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/color/mod.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="624">
<caret line="24" column="14" lean-forward="false" selection-start-line="24" selection-start-column="14" selection-end-line="24" selection-end-column="14" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/lib.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="416">
<caret line="16" column="27" lean-forward="false" selection-start-line="16" selection-start-column="27" selection-end-line="16" selection-end-column="27" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Cargo.toml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="547">
<caret line="23" column="17" lean-forward="false" selection-start-line="23" selection-start-column="17" selection-end-line="23" selection-end-column="17" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/shared/functions.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="364">
<caret line="14" column="0" lean-forward="false" selection-start-line="14" selection-start-column="0" selection-end-line="14" selection-end-column="0" />
<folding>
<element signature="e#467#468#0" expanded="false" />
<element signature="e#489#490#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/state/commands/shared_commands.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="338">
<caret line="13" column="0" lean-forward="false" selection-start-line="13" selection-start-column="0" selection-end-line="13" selection-end-column="0" />
<folding>
<element signature="e#381#382#0" expanded="false" />
<element signature="e#440#441#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/state/commands/win_commands.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="837">
<caret line="145" column="11" lean-forward="false" selection-start-line="145" selection-start-column="11" selection-end-line="145" selection-end-column="11" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/examples/Crossterm 0.2.1/terminal/alternate_screen.rs" />
<entry file="file://$PROJECT_DIR$/src/kernel/unix_kernel/mod.rs"> <entry file="file://$PROJECT_DIR$/src/kernel/unix_kernel/mod.rs">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0"> <state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
@ -839,7 +765,6 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="370"> <state relative-caret-position="370">
<caret line="27" column="4" lean-forward="true" selection-start-line="27" selection-start-column="4" selection-end-line="27" selection-end-column="4" /> <caret line="27" column="4" lean-forward="true" selection-start-line="27" selection-start-column="4" selection-end-line="27" selection-end-column="4" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
@ -847,7 +772,6 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="390"> <state relative-caret-position="390">
<caret line="17" column="5" lean-forward="true" selection-start-line="17" selection-start-column="5" selection-end-line="17" selection-end-column="5" /> <caret line="17" column="5" lean-forward="true" selection-start-line="17" selection-start-column="5" selection-end-line="17" selection-end-column="5" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
@ -855,84 +779,6 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="442"> <state relative-caret-position="442">
<caret line="17" column="29" lean-forward="true" selection-start-line="17" selection-start-column="29" selection-end-line="17" selection-end-column="29" /> <caret line="17" column="29" lean-forward="true" selection-start-line="17" selection-start-column="29" selection-end-line="17" selection-end-column="29" />
<folding>
<element signature="e#1768#1769#0" expanded="false" />
<element signature="e#1805#1806#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/terminal/terminal.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="156">
<caret line="6" column="0" lean-forward="true" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/terminal/screen.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="364">
<caret line="14" column="7" lean-forward="true" selection-start-line="14" selection-start-column="7" selection-end-line="14" selection-end-column="7" />
<folding>
<element signature="e#1905#1906#0" expanded="false" />
<element signature="e#1971#1972#0" expanded="false" />
<element signature="e#2009#2010#0" expanded="false" />
<element signature="e#2078#2079#0" expanded="false" />
<element signature="e#2571#2572#0" expanded="false" />
<element signature="e#2637#2638#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/manager/terminal.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="156">
<caret line="6" column="29" lean-forward="false" selection-start-line="6" selection-start-column="29" selection-end-line="6" selection-end-column="29" />
<folding>
<element signature="e#493#1016#0" expanded="false" />
<element signature="e#1157#2182#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/manager/mod.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="312">
<caret line="12" column="0" lean-forward="false" selection-start-line="12" selection-start-column="0" selection-end-line="12" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/state/context.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="260">
<caret line="10" column="0" lean-forward="false" selection-start-line="10" selection-start-column="0" selection-end-line="10" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/manager/ansi_manager.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="390">
<caret line="18" column="5" lean-forward="false" selection-start-line="18" selection-start-column="5" selection-end-line="18" selection-end-column="5" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/terminal/mod.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="468">
<caret line="18" column="20" lean-forward="false" selection-start-line="18" selection-start-column="20" selection-end-line="18" selection-end-column="20" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/manager/manager.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="130">
<caret line="5" column="11" lean-forward="false" selection-start-line="5" selection-start-column="11" selection-end-line="5" selection-end-column="11" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
@ -940,7 +786,6 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="448"> <state relative-caret-position="448">
<caret line="22" column="90" lean-forward="false" selection-start-line="22" selection-start-column="90" selection-end-line="22" selection-end-column="90" /> <caret line="22" column="90" lean-forward="false" selection-start-line="22" selection-start-column="90" selection-end-line="22" selection-end-column="90" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
@ -948,7 +793,6 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="390"> <state relative-caret-position="390">
<caret line="15" column="1" lean-forward="false" selection-start-line="15" selection-start-column="1" selection-end-line="15" selection-end-column="1" /> <caret line="15" column="1" lean-forward="false" selection-start-line="15" selection-start-column="1" selection-end-line="15" selection-end-column="1" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
@ -960,19 +804,88 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/kernel/unix_kernel/terminal.rs"> <entry file="file://$PROJECT_DIR$/src/terminal/ansi_terminal.rs">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="390"> <state relative-caret-position="572">
<caret line="15" column="22" lean-forward="false" selection-start-line="15" selection-start-column="22" selection-end-line="15" selection-end-column="22" /> <caret line="59" column="59" lean-forward="false" selection-start-line="59" selection-start-column="59" selection-end-line="59" selection-end-column="59" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/color/mod.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="546">
<caret line="21" column="1" lean-forward="false" selection-start-line="21" selection-start-column="1" selection-end-line="21" selection-end-column="1" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/cursor/ansi_cursor.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="448">
<caret line="22" column="89" lean-forward="false" selection-start-line="22" selection-start-column="89" selection-end-line="22" selection-end-column="89" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/state/commands/win_commands.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="241">
<caret line="91" column="1" lean-forward="false" selection-start-line="91" selection-start-column="1" selection-end-line="91" selection-end-column="1" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/state/commands/mod.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="439">
<caret line="39" column="10" lean-forward="false" selection-start-line="39" selection-start-column="10" selection-end-line="39" selection-end-column="10" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/state/commands/unix_command.rs"> <entry file="file://$PROJECT_DIR$/src/state/mod.rs">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="494"> <state relative-caret-position="0">
<caret line="28" column="52" lean-forward="false" selection-start-line="28" selection-start-column="52" selection-end-line="28" selection-end-column="52" /> <caret line="0" column="15" lean-forward="false" selection-start-line="0" selection-start-column="15" selection-end-line="0" selection-end-column="15" />
<folding /> </state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/shared/functions.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="364">
<caret line="14" column="0" lean-forward="false" selection-start-line="14" selection-start-column="0" selection-end-line="14" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/terminal/terminal.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="98">
<caret line="5" column="30" lean-forward="false" selection-start-line="5" selection-start-column="30" selection-end-line="5" selection-end-column="30" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/shared/mod.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="208">
<caret line="8" column="12" lean-forward="false" selection-start-line="8" selection-start-column="12" selection-end-line="8" selection-end-column="12" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/state/commands/shared_commands.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="468">
<caret line="20" column="24" lean-forward="false" selection-start-line="20" selection-start-column="24" selection-end-line="20" selection-end-column="24" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/manager/mod.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="312">
<caret line="12" column="10" lean-forward="false" selection-start-line="12" selection-start-column="10" selection-end-line="12" selection-end-column="10" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/manager/manager.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-72">
<caret line="7" column="37" lean-forward="false" selection-start-line="7" selection-start-column="37" selection-end-line="7" selection-end-column="37" />
</state> </state>
</provider> </provider>
</entry> </entry>
@ -980,31 +893,146 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="552"> <state relative-caret-position="552">
<caret line="132" column="28" lean-forward="false" selection-start-line="132" selection-start-column="28" selection-end-line="132" selection-end-column="28" /> <caret line="132" column="28" lean-forward="false" selection-start-line="132" selection-start-column="28" selection-end-line="132" selection-end-column="28" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/manager/ansi_manager.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="364">
<caret line="35" column="5" lean-forward="false" selection-start-line="35" selection-start-column="5" selection-end-line="35" selection-end-column="5" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/terminal/terminal.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="260">
<caret line="10" column="20" lean-forward="false" selection-start-line="10" selection-start-column="20" selection-end-line="10" selection-end-column="20" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/lib.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="546">
<caret line="21" column="0" lean-forward="false" selection-start-line="21" selection-start-column="0" selection-end-line="21" selection-end-column="0" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/terminal/ansi_terminal.rs"> <entry file="file://$PROJECT_DIR$/src/shared/screen.rs">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="572"> <state relative-caret-position="1326">
<caret line="59" column="59" lean-forward="false" selection-start-line="59" selection-start-column="59" selection-end-line="59" selection-end-column="59" /> <caret line="51" column="11" lean-forward="false" selection-start-line="51" selection-start-column="11" selection-end-line="51" selection-end-column="11" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/cursor/ansi_cursor.rs"> <entry file="file://$PROJECT_DIR$/src/terminal/mod.rs">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="416"> <state relative-caret-position="520">
<caret line="16" column="1" lean-forward="true" selection-start-line="16" selection-start-column="1" selection-end-line="16" selection-end-column="1" /> <caret line="20" column="0" lean-forward="false" selection-start-line="20" selection-start-column="0" selection-end-line="20" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/terminal/mod.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="26">
<caret line="1" column="17" lean-forward="false" selection-start-line="1" selection-start-column="17" selection-end-line="1" selection-end-column="17" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/bin.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="650">
<caret line="25" column="25" lean-forward="false" selection-start-line="25" selection-start-column="25" selection-end-line="25" selection-end-column="25" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/terminal/alternate_screen.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1456">
<caret line="56" column="7" lean-forward="false" selection-start-line="56" selection-start-column="7" selection-end-line="56" selection-end-column="7" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/examples/Crossterm 0.2.2 - New Version (Not finished)/terminal/raw_mode.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="604">
<caret line="53" column="0" lean-forward="false" selection-start-line="53" selection-start-column="0" selection-end-line="53" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Cargo.toml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="287">
<caret line="13" column="14" lean-forward="false" selection-start-line="13" selection-start-column="14" selection-end-line="13" selection-end-column="14" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/shared/terminal.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="296">
<caret line="14" column="8" lean-forward="false" selection-start-line="14" selection-start-column="8" selection-end-line="14" selection-end-column="8" />
<folding> <folding>
<element signature="e#380#381#0" expanded="true" /> <element signature="e#488#1011#0" expanded="false" />
<element signature="e#419#420#0" expanded="true" /> <element signature="e#1152#2177#0" expanded="false" />
<element signature="e#838#839#0" expanded="true" />
<element signature="e#894#895#0" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/shared/macros.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="52">
<caret line="2" column="13" lean-forward="false" selection-start-line="2" selection-start-column="13" selection-end-line="2" selection-end-column="13" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/shared/raw.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="500">
<caret line="94" column="4" lean-forward="false" selection-start-line="94" selection-start-column="4" selection-end-line="94" selection-end-column="4" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/kernel/unix_kernel/terminal.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="366">
<caret line="86" column="31" lean-forward="false" selection-start-line="86" selection-start-column="31" selection-end-line="86" selection-end-column="31" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/state/context.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="474">
<caret line="55" column="26" lean-forward="false" selection-start-line="55" selection-start-column="26" selection-end-line="55" selection-end-column="26" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/.cargo/registry/src/github.com-1ecc6299db9ec823/termios-0.3.0/src/lib.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="296">
<caret line="170" column="11" lean-forward="false" selection-start-line="170" selection-start-column="11" selection-end-line="170" selection-end-column="11" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/state/commands/unix_command.rs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="292">
<caret line="101" column="27" lean-forward="false" selection-start-line="101" selection-start-column="27" selection-end-line="101" selection-end-column="27" />
<folding />
</state>
</provider>
</entry>
</component> </component>
<component name="masterDetails"> <component name="masterDetails">
<states> <states>

View File

@ -13,7 +13,15 @@
extern crate crossterm; extern crate crossterm;
mod terminal;
use terminal::alternate_screen;
use terminal::raw_mode;
use crossterm::cursor; use crossterm::cursor;
fn main() { fn main() {
raw_mode::print_wait_screen_on_alternate_window();
} }

View File

@ -1,73 +1,82 @@
// alternate screen is not working correctly currently extern crate crossterm;
use crossterm::Terminal;
use crossterm::screen::AlternateScreen;
use crossterm::cursor::cursor;
use crossterm::terminal::{self, ClearType};
//extern crate crossterm; use std::io::{Write, stdout};
// use std::{time, thread};
//use crossterm::terminal::screen::{AlternateScreen, ToAlternateScreen, ToMainScreen};
//use crossterm::cursor::cursor; fn print_wait_screen(terminal: &Terminal)
//use crossterm::terminal::{self, ClearType}; {
// terminal::terminal(&terminal).clear(ClearType::All);
//use std::io::{Write, stdout};
//use std::{time, thread}; let mut cursor = cursor(&terminal);
// cursor.goto(0,0);
//fn print_wait_screen(screen: &mut Write)
//{ {
// terminal::terminal().clear(ClearType::All); let mut screen_manager = terminal.screen_manager.lock().unwrap();
// write!(screen, {
// "Welcome to the wait screen.\n\ write!(screen_manager.stdout(),
// Please wait a few seconds until we arrive back at the main screen.\n\ "Welcome to the wait screen.\n\
// Seconds to Go: " Please wait a few seconds until we arrive back at the main screen.\n\
// ); Progress: "
// );
// let mut counter = 5; }
// // get cursor instance }
// let mut cursor = cursor();
// // print some progress example.
// // loop until the counter hits 0 for i in 1..5
// loop {
// { // print the current counter at the line of `Seconds to Go: {counter}`
// // 1 second delay cursor.goto(10,2).print(format!("{} of the 5 items processed", i));
// thread::sleep(time::Duration::from_secs(1));
// // decrement counter // 1 second delay
// counter -= 1; thread::sleep(time::Duration::from_secs(1));
// }
// // print the current counter at the line of `Seconds to Go: {counter}` }
// cursor.goto(15,2).print(counter);
// pub fn print_wait_screen_on_alternate_window()
// if counter <= 0 {
// { let terminal = Terminal::new();
// break;
// } // create scope. If this scope ends the screen will be switched back to mainscreen.
// } // because `AlternateScreen` switches back to main screen when switching back.
//} {
// // create new alternate screen instance and switch to the alternate screen.
//pub fn with_alternate_screen_instance() let mut screen = AlternateScreen::from(&terminal);
//{
// // create scope. If this scope ends the screen will be switched back to mainscreen. // Print the wait screen.
// // becouse `AlternateScreen` switches back to main screen when switching back. print_wait_screen(&terminal);
// { }
// // create new alternate screen instance and switch to the alternate screen.
// let mut screen = AlternateScreen::from(stdout()); println!("Whe are back at the main screen");
// }
// // Print the wait screen.
// print_wait_screen(&mut screen); pub fn switch_between_main_and_alternate_screen()
// } {
// let terminal = Terminal::new();
// println!("Whe are back at the main screen"); let mut cursor = cursor(&terminal);
//}
// {
//pub fn manually_switch_to_alternate_screen() // create new alternate screen instance and switch to the alternate screen.
//{ let mut screen = AlternateScreen::from(&terminal);
// // You can switch to alternate screen manually but if you forget to switch back your terminal may cause some undefined behavior. cursor.goto(0,0);
// write!(screen, "we are at the alternate screen!");
// let mut screen = stdout(); screen.flush();
// thread::sleep(time::Duration::from_secs(3));
// // switch to alternate screeen
// write!(screen, "{}", ToAlternateScreen); screen.to_main();
// // load wait screen write!(screen, "we are at the main screen!");
// print_wait_screen(&mut screen); screen.flush();
// // switch back thread::sleep(time::Duration::from_secs(3));
// write!(screen,"{}", ToMainScreen);
// println!("Whe are back at the main screen"); screen.to_alternate();
// write!(screen, "we are at the alternate screen!");
//} screen.flush();
thread::sleep(time::Duration::from_secs(3));
}
println!("Whe are back at the main screen");
}

View File

@ -1,5 +1,3 @@
mod alternate_screen; pub mod alternate_screen;
mod raw_mode; pub mod raw_mode;
pub mod terminal; pub mod terminal;

View File

@ -1 +1,60 @@
extern crate crossterm;
use crossterm::Terminal;
use crossterm::screen::AlternateScreen;
use crossterm::cursor::cursor;
use crossterm::terminal::{self, ClearType};
use std::io::{Write, stdout};
use std::{time, thread};
use crossterm::raw::IntoRawMode;
// raw screen is not working correctly currently // raw screen is not working correctly currently
fn print_wait_screen(terminal: &Terminal)
{
terminal::terminal(&terminal).clear(ClearType::All);
let mut cursor = cursor(&terminal);
cursor.goto(0,0);
{
let mut screen_manager = terminal.screen_manager.lock().unwrap();
{
write!(screen_manager.stdout(),
"Welcome to the wait screen.\n\
Please wait a few seconds until we arrive back at the main screen.\n\
Progress: "
);
}
}
// print some progress example.
for i in 1..5
{
// print the current counter at the line of `Seconds to Go: {counter}`
cursor.goto(10,2).print(format!("{} of the 5 items processed", i));
// 1 second delay
thread::sleep(time::Duration::from_secs(1));
}
}
pub fn print_wait_screen_on_alternate_window()
{
let terminal = Terminal::new();
// create scope. If this scope ends the screen will be switched back to mainscreen.
// because `AlternateScreen` switches back to main screen when switching back.
{
let a = stdout().into_raw_mode(&terminal);
thread::sleep(time::Duration::from_secs(3));
// // Print the wait screen.
// print_wait_screen(&terminal);
}
println!("Whe are back at the main screen");
}

View File

@ -4,7 +4,8 @@
extern crate crossterm; extern crate crossterm;
use crossterm::terminal::{ Terminal, ClearType, terminal}; use crossterm::Terminal;
use crossterm::terminal::{ ClearType, terminal };
use crossterm::cursor; use crossterm::cursor;
fn print_test_data() fn print_test_data()
@ -17,8 +18,10 @@ fn print_test_data()
/// Clear all lines in terminal | demonstration /// Clear all lines in terminal | demonstration
pub fn clear_all_lines() pub fn clear_all_lines()
{ {
let term = Terminal::new();
// Get terminal // Get terminal
let mut terminal = terminal(); let mut terminal = terminal(&term);
print_test_data(); print_test_data();
@ -29,13 +32,15 @@ pub fn clear_all_lines()
/// Clear all lines from cursor position X:4, Y:4 down | demonstration /// Clear all lines from cursor position X:4, Y:4 down | demonstration
pub fn clear_from_cursor_down() pub fn clear_from_cursor_down()
{ {
let term = Terminal::new();
// Get terminal // Get terminal
let mut terminal = terminal(); let mut terminal = terminal(&term);
print_test_data(); print_test_data();
// Set terminal cursor position (see example for more info). // Set terminal cursor position (see example for more info).
cursor::cursor().goto(4,8); cursor::cursor(&term).goto(4,8);
// Clear all cells from current cursor position down. // Clear all cells from current cursor position down.
terminal.clear(ClearType::FromCursorDown); terminal.clear(ClearType::FromCursorDown);
@ -44,13 +49,15 @@ pub fn clear_from_cursor_down()
/// Clear all lines from cursor position X:4, Y:4 up | demonstration /// Clear all lines from cursor position X:4, Y:4 up | demonstration
pub fn clear_from_cursor_up() pub fn clear_from_cursor_up()
{ {
let term = Terminal::new();
// Get terminal // Get terminal
let mut terminal = terminal(); let mut terminal = terminal(&term);
print_test_data(); print_test_data();
// Set terminal cursor position (see example for more info). // Set terminal cursor position (see example for more info).
cursor::cursor().goto(4,4); cursor::cursor(&term).goto(4,4);
// Clear all cells from current cursor position down. // Clear all cells from current cursor position down.
terminal.clear(ClearType::FromCursorUp); terminal.clear(ClearType::FromCursorUp);
@ -59,13 +66,15 @@ pub fn clear_from_cursor_up()
/// Clear all lines from cursor position X:4, Y:4 up | demonstration /// Clear all lines from cursor position X:4, Y:4 up | demonstration
pub fn clear_current_line() pub fn clear_current_line()
{ {
let term = Terminal::new();
// Get terminal // Get terminal
let mut terminal = terminal(); let mut terminal = terminal(&term);
print_test_data(); print_test_data();
// Set terminal cursor position (see example for more info). // Set terminal cursor position (see example for more info).
cursor::cursor().goto(4,4); cursor::cursor(&term).goto(4,4);
// Clear current line cells. // Clear current line cells.
terminal.clear(ClearType::CurrentLine); terminal.clear(ClearType::CurrentLine);
@ -74,13 +83,15 @@ pub fn clear_current_line()
/// Clear all lines from cursor position X:4, Y:7 up | demonstration /// Clear all lines from cursor position X:4, Y:7 up | demonstration
pub fn clear_until_new_line() pub fn clear_until_new_line()
{ {
let term = Terminal::new();
// Get terminal // Get terminal
let mut terminal = terminal(); let mut terminal = terminal(&term);
print_test_data(); print_test_data();
// Set terminal cursor position (see example for more info). // Set terminal cursor position (see example for more info).
cursor::cursor().goto(4,20); cursor::cursor(&term).goto(4,20);
// Clear all the cells until next line. // Clear all the cells until next line.
terminal.clear(ClearType::UntilNewLine); terminal.clear(ClearType::UntilNewLine);
@ -89,8 +100,10 @@ pub fn clear_until_new_line()
/// Print the the current terminal size | demonstration. /// Print the the current terminal size | demonstration.
pub fn print_terminal_size() pub fn print_terminal_size()
{ {
let term = Terminal::new();
// Get terminal // Get terminal
let mut terminal = terminal(); let mut terminal = terminal(&term);
// Get terminal size // Get terminal size
let terminal_size = terminal.terminal_size(); let terminal_size = terminal.terminal_size();
// Print results // Print results
@ -100,7 +113,9 @@ pub fn print_terminal_size()
/// Set the terminal size to width 10, height: 10 | demonstration. /// Set the terminal size to width 10, height: 10 | demonstration.
pub fn set_terminal_size() pub fn set_terminal_size()
{ {
let mut terminal = terminal(); let term = Terminal::new();
let mut terminal = terminal(&term);
terminal.set_size(10,10); terminal.set_size(10,10);
} }
@ -108,9 +123,11 @@ pub fn set_terminal_size()
/// Scroll down 10 lines | demonstration. /// Scroll down 10 lines | demonstration.
pub fn scroll_down() pub fn scroll_down()
{ {
let term = Terminal::new();
print_test_data(); print_test_data();
// Get terminal // Get terminal
let mut terminal = terminal(); let mut terminal = terminal(&term);
// Scroll down 10 lines. // Scroll down 10 lines.
terminal.scroll_down(10); terminal.scroll_down(10);
} }
@ -118,10 +135,12 @@ pub fn scroll_down()
/// Scroll down 10 lines | demonstration. /// Scroll down 10 lines | demonstration.
pub fn scroll_up() pub fn scroll_up()
{ {
let term = Terminal::new();
print_test_data(); print_test_data();
// Get terminal // Get terminal
let mut terminal = terminal(); let mut terminal = terminal(&term);
// Scroll up 10 lines. // Scroll up 10 lines.
terminal.scroll_up(10); terminal.scroll_up(10);
} }
@ -129,8 +148,10 @@ pub fn scroll_up()
/// Resize the terminal to X: 10, Y: 10 | demonstration. /// Resize the terminal to X: 10, Y: 10 | demonstration.
pub fn resize_terminal() pub fn resize_terminal()
{ {
let term = Terminal::new();
// Get terminal // Get terminal
let mut terminal = terminal(); let mut terminal = terminal(&term);
// Get terminal size // Get terminal size
terminal.set_size(10,10); terminal.set_size(10,10);
} }

View File

@ -21,7 +21,6 @@ impl<'term> ITerminalCursor for AnsiCursor {
fn goto(&self, x: u16, y: u16, terminal: &Terminal) fn goto(&self, x: u16, y: u16, terminal: &Terminal)
{ {
// ANSI codes are one-based. I want 0 based so we just need to increment and x,y. // ANSI codes are one-based. I want 0 based so we just need to increment and x,y.
let mut screen = terminal.screen_manager.lock().unwrap(); let mut screen = terminal.screen_manager.lock().unwrap();
{ {
screen.write_ansi(format!(csi!("{};{}H"), y + 1, x +1)); screen.write_ansi(format!(csi!("{};{}H"), y + 1, x +1));

View File

@ -44,9 +44,8 @@ pub fn pos(terminal: &Terminal) -> (u16,u16)
{ {
use std::io::{ Write,Read }; use std::io::{ Write,Read };
let mut context = Context::new();
{ let mut command = NoncanonicalModeCommand::new(&terminal.context);
let mut command = NoncanonicalModeCommand::new(&mut context);
command.0.execute(&terminal); command.0.execute(&terminal);
// This code is original written by term_cursor credits to them. // This code is original written by term_cursor credits to them.
@ -98,8 +97,11 @@ pub fn pos(terminal: &Terminal) -> (u16,u16)
// Expect `R` // Expect `R`
let res = if c == 'R' { (cols as u16, rows as u16) } else { return (0, 0) }; let res = if c == 'R' { (cols as u16, rows as u16) } else { return (0, 0) };
res let mut context = terminal.context.lock().unwrap();
{
context.undo_state(command.1, terminal);
} }
res
} }
/// Set the terminal mode to the given mode. /// Set the terminal mode to the given mode.

View File

@ -13,10 +13,13 @@ pub mod style;
pub mod terminal; pub mod terminal;
pub mod manager; pub mod manager;
pub use shared::{screen, raw};
use shared::traits::{Construct}; use shared::traits::{Construct};
pub use state::{ Context }; pub use state::{ Context };
pub use manager::manager::{ ScreenManager }; pub use manager::manager::{ ScreenManager };
pub use manager::terminal::{ Terminal }; pub use shared::terminal::Terminal;
#[cfg(windows)] #[cfg(windows)]
extern crate winapi; extern crate winapi;

View File

@ -4,7 +4,7 @@ use super::IScreenManager;
pub struct AnsiScreenManager<Output:Write> pub struct AnsiScreenManager<Output:Write>
{ {
is_alternate_screen: bool, pub is_alternate_screen: bool,
output: Output, output: Output,
} }
@ -15,28 +15,33 @@ impl<Output :Write> IScreenManager<Output> for AnsiScreenManager<Output>
return &mut self.output return &mut self.output
} }
fn register_output(&mut self, output: Output, is_alternate_screen: bool) fn toggle_is_alternate_screen(&mut self, is_alternate_screen: bool)
{ {
self.output = output;
self.is_alternate_screen = is_alternate_screen; self.is_alternate_screen = is_alternate_screen;
} }
fn write_ansi(&mut self, string: String) fn write_ansi(&mut self, string: String)
{ {
match self.is_alternate_screen write!(self.output, "{}", string);
{ self.flush();
true => write!(self.output, "{}", string), // println!("test");
false => write!(io::stdout(), "{}", string), // match self.is_alternate_screen
}; // {
// true => ,
// false => write!(io::stdout(), "{}", string),
// };
} }
fn write_ansi_str(&mut self, string: &str) fn write_ansi_str(&mut self, string: &str)
{ {
match self.is_alternate_screen write!(self.output, "{}", string);
{ self.flush();
true => write!(self.output, "{}", string), // println!("test");
false => write!(io::stdout(), "{}", string), // match self.is_alternate_screen
}; // {
// true => write!(self.output, "{}", string),
// false => write!(io::stdout(), "{}", string),
// };
} }
} }

View File

@ -27,9 +27,9 @@ impl ScreenManager
self.screen_manager.stdout() self.screen_manager.stdout()
} }
pub fn register_output(&mut self, output: Box<Write>, is_alternate_screen: bool) pub fn toggle_is_alternate_screen(&mut self,is_alternate_screen: bool)
{ {
self.screen_manager.register_output(output,is_alternate_screen); self.screen_manager.toggle_is_alternate_screen(is_alternate_screen);
} }
pub fn write_ansi(&mut self, string: String) pub fn write_ansi(&mut self, string: String)

View File

@ -1,5 +1,4 @@
pub mod manager; pub mod manager;
pub mod terminal;
#[cfg(target_os = "windows")] #[cfg(target_os = "windows")]
mod win_manager; mod win_manager;
@ -14,7 +13,7 @@ pub use self::manager::{ ScreenManager };
pub trait IScreenManager<Output> pub trait IScreenManager<Output>
{ {
fn stdout(&mut self) -> &mut Output; fn stdout(&mut self) -> &mut Output;
fn register_output(&mut self, output: Output, is_alternate_screen: bool); fn toggle_is_alternate_screen(&mut self, is_alternate_screen: bool);
fn write_ansi(&mut self, string: String); fn write_ansi(&mut self, string: String);
fn write_ansi_str(&mut self, string: &str); fn write_ansi_str(&mut self, string: &str);
} }

View File

@ -4,3 +4,6 @@
pub mod macros; pub mod macros;
pub mod traits; pub mod traits;
pub mod functions; pub mod functions;
pub mod terminal;
pub mod screen;
pub mod raw;

104
src/shared/raw.rs Normal file
View File

@ -0,0 +1,104 @@
//! This module is used for enabling and disabling raw mode for the terminal.
//!
//! What exactly is raw state:
//! - No line buffering.
//! Normally the terminals uses line buffering. This means that the input will be send to the terminal line by line.
//! With raw mode the input will be send one byte at a time.
//! - Input
//! All input has to be written manually by the programmer.
//! - Characters
//! The characters are not processed by the terminal driver, but are sent straight through.
//! Special character have no meaning, like backspace will not be interpret as backspace but instead will be directly send to the terminal.
//!
//! With these modes you can easier design the terminal screen.
//!
//! # Example
//!
//! ```rust
//! to be implemented
//!
//! ```
#[cfg(not(windows))]
use super::super::state::commands::unix_command::EnableRawModeCommand;
#[cfg(windows)]
use state::commands::win_commands::EnableRawModeCommand;
use { Terminal };
use state::commands::IContextCommand;
use std::io::{ self, Write};
/// A wrapper for the raw terminal state. Which can be used to write to.
pub struct RawTerminal<'a>
{
terminal : &'a Terminal,
command_id: u16,
}
/// Trait withs contains a method for switching into raw mode.
pub trait IntoRawMode<'a>: Write + Sized
{
fn into_raw_mode(&self, terminal: &'a Terminal) -> io::Result<RawTerminal<'a>>;
}
//impl<'a> IntoRawMode<'a> for RawTerminal<'a>
//{
// /// Switch to raw mode.
// ///
// /// Raw mode means that input (stdin) won't be printed it will instead have to be written manually by
// /// the program. The input isn't canonicalised or line buffered (that is, you can
// /// read from input(stdin) one byte of a time).
// fn into_raw_mode(self, terminal: &'a Terminal) -> io::Result<RawTerminal>
// {
// let (mut command, command_id) = EnableRawModeCommand::new(&terminal.context);
// let success = command.execute(&terminal);
//
// if success
// {
// Ok(RawTerminal { terminal: terminal, command_id: command_id})
//
// }else { panic!("cannot move into raw mode") }
// }
//}
impl <'a, W: Write> IntoRawMode<'a> for W
{
fn into_raw_mode(&self, terminal: &'a Terminal) -> io::Result<RawTerminal<'a>> {
let (mut command, command_id) = EnableRawModeCommand::new(&terminal.context);
let success = command.execute(&terminal);
if success
{
Ok(RawTerminal { terminal: &terminal, command_id: command_id})
}else { panic!("cannot move into raw mode") }
}
}
impl<'a> Write for RawTerminal<'a> {
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
let mut screen = self.terminal.screen_manager.lock().unwrap();
{
screen.stdout().write(buf)
}
}
fn flush(&mut self) -> io::Result<()> {
let mut screen = self.terminal.screen_manager.lock().unwrap();
{
screen.stdout().flush()
}
}
}
/// If an instance of `RawTerminal` will be dropped all terminal changes that are made will be undone.
impl <'a> Drop for RawTerminal<'a>
{
fn drop(&mut self)
{
let mut context = self.terminal.context.lock().unwrap();
{
context.undo_state(self.command_id, &self.terminal);
}
}
}

View File

@ -56,11 +56,6 @@ pub struct AlternateScreen<'term> {
impl<'term> AlternateScreen<'term> { impl<'term> AlternateScreen<'term> {
pub fn from(output: &'term Terminal) -> Self { pub fn from(output: &'term Terminal) -> Self {
get_to_alternate_screen_command().execute(&output); get_to_alternate_screen_command().execute(&output);
//
// let mut screen = output.screen_manager.lock().unwrap();
// {
// screen.register_output(Box::from(o), true);
// }
AlternateScreen { term: output } AlternateScreen { term: output }
} }

View File

@ -1,8 +1,7 @@
use std::sync::Mutex; use std::sync::Mutex;
use std::rc::Rc; use std::rc::Rc;
use { Context }; use { Context, ScreenManager};
use super::super::manager::ScreenManager;
//use super::super::terminal; //use super::super::terminal;
//use super::super::cursor; //use super::super::cursor;
@ -13,7 +12,7 @@ use std::fmt;
pub struct Terminal pub struct Terminal
{ {
pub screen_manager: Rc<Mutex<ScreenManager>>, pub screen_manager: Rc<Mutex<ScreenManager>>,
context: Context pub context: Mutex<Context>
} }
impl Terminal impl Terminal
@ -22,7 +21,7 @@ impl Terminal
{ {
Terminal { Terminal {
screen_manager: Rc::new(Mutex::new(ScreenManager::new())), screen_manager: Rc::new(Mutex::new(ScreenManager::new())),
context: Context::new() context: Mutex::new(Context::new())
} }
} }

View File

@ -9,7 +9,7 @@
//! //!
//! See the `Context` struct where we store the commands for more info. //! See the `Context` struct where we store the commands for more info.
use rand; use std::sync::Mutex;
#[cfg(unix)] #[cfg(unix)]
pub mod unix_command; pub mod unix_command;
@ -39,13 +39,7 @@ pub trait ICommand
pub trait IContextCommand pub trait IContextCommand
{ {
fn new(context: &mut Context) -> (Box<Self>, i16) where Self: Sized; fn new(context: &Mutex<Context>) -> (Box<Self>, u16) where Self: Sized;
fn execute(&mut self, terminal: &Terminal) -> bool; fn execute(&mut self, terminal: &Terminal) -> bool;
fn undo(&mut self, terminal: &Terminal) -> bool; fn undo(&mut self, terminal: &Terminal) -> bool;
} }
/// This generates an random key for the `ContextCommand`.
/// So that we can identify the `ContextCommand` in an list of commands.
fn generate_key() -> i16 {
rand::random::<i16>()
}

View File

@ -17,6 +17,7 @@ impl ICommand for ToAlternateScreenBufferCommand
let mut screen = terminal.screen_manager.lock().unwrap(); let mut screen = terminal.screen_manager.lock().unwrap();
{ {
screen.write_ansi_str(csi!("?1049h")); screen.write_ansi_str(csi!("?1049h"));
screen.toggle_is_alternate_screen(true);
return true; return true;
} }
} }
@ -26,6 +27,7 @@ impl ICommand for ToAlternateScreenBufferCommand
let mut screen = terminal.screen_manager.lock().unwrap(); let mut screen = terminal.screen_manager.lock().unwrap();
{ {
screen.write_ansi_str(csi!("?1049l")); screen.write_ansi_str(csi!("?1049l"));
screen.toggle_is_alternate_screen(false);
return true; return true;
} }
} }

View File

@ -7,21 +7,27 @@ use termios::{Termios, tcsetattr, TCSAFLUSH, ICANON, ECHO, CREAD};
const FD_STDIN: ::std::os::unix::io::RawFd = 1; const FD_STDIN: ::std::os::unix::io::RawFd = 1;
use std::sync::Mutex;
/// This command is used for switching to NoncanonicalMode. /// This command is used for switching to NoncanonicalMode.
#[derive(Clone, Copy)] #[derive(Copy, Clone)]
pub struct NoncanonicalModeCommand pub struct NoncanonicalModeCommand
{ {
key: i16 key: u16
} }
impl IContextCommand for NoncanonicalModeCommand impl IContextCommand for NoncanonicalModeCommand
{ {
fn new(context: &mut Context) -> (Box<NoncanonicalModeCommand>, i16) { fn new(context: &Mutex<Context>) -> (Box<NoncanonicalModeCommand>, u16) {
let key = super::generate_key(); let key = 1;
let mut context = context.lock().unwrap();
{
let command = NoncanonicalModeCommand { key: key }; let command = NoncanonicalModeCommand { key: key };
context.register_change(Box::from(command), key); context.register_change(Box::from(command), key);
(Box::from(command),key) (Box::from(command),key)
} }
}
fn execute(&mut self, terminal: &Terminal) -> bool fn execute(&mut self, terminal: &Terminal) -> bool
{ {
@ -64,28 +70,35 @@ impl IContextCommand for NoncanonicalModeCommand
} }
/// This command is used for enabling and disabling raw mode for the terminal. /// This command is used for enabling and disabling raw mode for the terminal.
#[derive(Clone, Copy)] #[derive(Copy, Clone)]
pub struct EnableRawModeCommand pub struct EnableRawModeCommand
{ {
original_mode: Option<Termios>, original_mode: Option<Termios>,
key: i16 command_id: u16
} }
impl IContextCommand for EnableRawModeCommand impl IContextCommand for EnableRawModeCommand
{ {
fn new(context: &mut Context) -> (Box<EnableRawModeCommand>, i16) { fn new(context: &Mutex<Context>) -> (Box<EnableRawModeCommand>, u16) {
let key = super::generate_key(); let key = 2;
let command = EnableRawModeCommand { original_mode: None, key: key };
let mut context = context.lock().unwrap();
{
let command = EnableRawModeCommand { original_mode: None, command_id: key };
context.register_change(Box::from(command), key); context.register_change(Box::from(command), key);
(Box::from(command), key) (Box::from(command), key)
} }
}
fn execute(&mut self, terminal: &Terminal) -> bool fn execute(&mut self, terminal: &Terminal) -> bool
{ {
if let Ok(original_mode) = terminal::get_terminal_mode() let original_mode = terminal::get_terminal_mode();
if let Ok(original_mode) = original_mode
{ {
panic!("setting {:?}", original_mode);
self.original_mode = Some(original_mode); self.original_mode = Some(original_mode);
let mut new_mode = self.original_mode.unwrap(); let mut new_mode = original_mode;
terminal::make_raw(&mut new_mode); terminal::make_raw(&mut new_mode);
terminal::set_terminal_mode(&new_mode); terminal::set_terminal_mode(&new_mode);
true true
@ -97,9 +110,11 @@ impl IContextCommand for EnableRawModeCommand
fn undo(&mut self, terminal: &Terminal) -> bool fn undo(&mut self, terminal: &Terminal) -> bool
{ {
if let Ok(original_mode) = terminal::get_terminal_mode() panic!("undoing {:?}", self.original_mode);
if let Some(original_mode) = self.original_mode
{ {
let result = terminal::set_terminal_mode(&self.original_mode.unwrap());
let result = terminal::set_terminal_mode(&original_mode);
match result match result
{ {

View File

@ -9,6 +9,8 @@ use winapi::um::wincon;
use winapi::um::wincon::{ENABLE_VIRTUAL_TERMINAL_PROCESSING ,SMALL_RECT, COORD, CHAR_INFO}; use winapi::um::wincon::{ENABLE_VIRTUAL_TERMINAL_PROCESSING ,SMALL_RECT, COORD, CHAR_INFO};
use std::mem; use std::mem;
use std::sync::Mutex;
/// This command is used for enabling and disabling ANSI code support for windows systems, /// This command is used for enabling and disabling ANSI code support for windows systems,
/// For more info check: https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences. /// For more info check: https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences.
#[derive(Clone, Copy)] #[derive(Clone, Copy)]

View File

@ -2,11 +2,11 @@
use std::collections::HashMap; use std::collections::HashMap;
use super::commands::IContextCommand; use super::commands::IContextCommand;
use Terminal;
/// Struct that stores the changed states of the terminal. /// Struct that stores the changed states of the terminal.
pub struct Context pub struct Context
{ {
changed_states: HashMap<i16, Box<IContextCommand>>, changed_states: HashMap<u16, Box<IContextCommand>>,
} }
impl Context impl Context
@ -19,9 +19,9 @@ impl Context
} }
} }
/// Restore all changes that are made to the terminal. // /// Restore all changes that are made to the terminal.
pub fn restore_changes(&mut self) // pub fn restore_changes(&mut self)
{ // {
// use std::iter::FromIterator; // use std::iter::FromIterator;
// //
// let mut buffer = Vec::new(); // let mut buffer = Vec::new();
@ -35,10 +35,10 @@ impl Context
// { // {
// buffer[i].1.undo(self); // buffer[i].1.undo(self);
// } // }
} // }
/// Register new changed state with the given key. /// Register new changed state with the given key.
pub fn register_change(&mut self, change: Box<IContextCommand>, key: i16) pub fn register_change(&mut self, change: Box<IContextCommand>, key: u16)
{ {
if !self.changed_states.contains_key(&key) if !self.changed_states.contains_key(&key)
{ {
@ -47,11 +47,16 @@ impl Context
} }
/// Undo an specific state by the given state key. /// Undo an specific state by the given state key.
pub fn undo_state(&mut self, state_key: i16) pub fn undo_state(&mut self, state_key: u16, terminal: &Terminal)
{ {
if self.changed_states.contains_key(&state_key) if self.changed_states.contains_key(&state_key)
{ {
self.changed_states.remove(&state_key); {
let mut command = self.changed_states.get_mut(&state_key).unwrap();
command.undo(&terminal);
}
&self.changed_states.remove(&state_key);
} }
} }
} }

View File

@ -19,9 +19,6 @@ pub mod terminal;
mod winapi_terminal; mod winapi_terminal;
mod ansi_terminal; mod ansi_terminal;
pub mod screen;
mod raw;
/// Enum that can be used for the kind of clearing that can be done in the terminal. /// Enum that can be used for the kind of clearing that can be done in the terminal.
pub enum ClearType { pub enum ClearType {
All, All,

View File

@ -1,82 +0,0 @@
////! This module is used for enabling and disabling raw mode for the terminal.
////!
////! What exactly is raw state:
////! - No line buffering.
////! Normally the terminals uses line buffering. This means that the input will be send to the terminal line by line.
////! With raw mode the input will be send one byte at a time.
////! - Input
////! All input has to be written manually by the programmer.
////! - Characters
////! The characters are not processed by the terminal driver, but are sent straight through.
////! Special character have no meaning, like backspace will not be interpret as backspace but instead will be directly send to the terminal.
////!
////! With these modes you can easier design the terminal screen.
////!
////! # Example
////!
////! ```rust
////! to be implemented
////!
////! ```
//
//#[cfg(not(windows))]
//use state::commands::unix_command::EnableRawModeCommand;
//#[cfg(windows)]
//use state::commands::win_commands::EnableRawModeCommand;
//
//use Context;
//use state::commands::IContextCommand;
//
//use std::io::{ self, Write};
//
///// A wrapper for the raw terminal state. Which can be used to write to.
//pub struct RawTerminal<'a, W: Write>
//{
// output: W,
// context : &'a mut Context
//}
//
///// Trait withs contains a method for switching into raw mode.
//pub trait IntoRawMode: Write + Sized
//{
// fn into_raw_mode<'a>(self, context: &'a mut Context) -> io::Result<RawTerminal<Self>>;
//}
//
//impl<W: Write> IntoRawMode for W
//{
// /// Switch to raw mode.
// ///
// /// Raw mode means that input (stdin) won't be printed it will instead have to be written manually by
// /// the program. The input isn't canonicalised or line buffered (that is, you can
// /// read from input(stdin) one byte of a time).
// fn into_raw_mode<'a>(self, context: &'a mut Context) -> io::Result<RawTerminal<Self>>
// {
// let (mut command, _) = EnableRawModeCommand::new(context);
// let success = command.execute(&context);
//
// if success
// {
// Ok(RawTerminal { output: self, context: context})
//
// }else { panic!("cannot move into raw mode") }
// }
//}
//
//impl<'a, W: Write> Write for RawTerminal<'a, W> {
// fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
// self.output.write(buf)
// }
//
// fn flush(&mut self) -> io::Result<()> {
// self.output.flush()
// }
//}
//
///// If an instance of `RawTerminal` will be dropped all terminal changes that are made will be undone.
//impl <'a, W: Write> Drop for RawTerminal<'a, W>
//{
// fn drop(&mut self)
// {
// self.context.restore_changes();
// }
//}

View File

@ -3,7 +3,7 @@
use super::*; use super::*;
use Construct; use Construct;
use super::super::manager::terminal; use super::super::shared::terminal;
/// Struct that stores an specific platform implementation for terminal related actions. /// Struct that stores an specific platform implementation for terminal related actions.
pub struct Terminal<'terminal> { pub struct Terminal<'terminal> {