This repository has been archived by the owner on Feb 13, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 249
Add TerminalBuffer & TerminalCursor, parse \n \r \b, and more escape codes #85
Open
ian-mcdowell
wants to merge
21
commits into
louisdh:master
Choose a base branch
from
ian-mcdowell:carriage
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 7 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
7f87ab5
Added TerminalCursor, more control character recognition
ian-mcdowell 25f4c61
Merge branch 'master' into carriage
ian-mcdowell 604e891
A few fixes after merge
ian-mcdowell 248f75b
Added tests for TerminalCursor
ian-mcdowell 04e1292
Added TerminalBufferTests, Moved GCD helpers into Dispatch+Custom
ian-mcdowell 194a57f
Removed absolute path from pbxproj to fix build
ian-mcdowell b072134
Removed cyclomatic complexity error for Parser method
ian-mcdowell 3eaa455
Added ParserTests, XCTAssert -> XCTAssertEqual, enabled codecov
ian-mcdowell 779714b
Moved ios_system setup to AppDelegate
ian-mcdowell 66ba9f8
Synchronize TerminalCursor & textview cursor, add distance to Termina…
ian-mcdowell f3b3af8
Fixed bug causing history to be corrupted
ian-mcdowell ba89fcf
Added Outputsanitizer into the Parser
ian-mcdowell 0abe5dc
Merge branch 'master' into carriage
ian-mcdowell d09ebcd
Fixed parser tests
ian-mcdowell 59f516d
Added basic sanitizer test, refactored ParserTests a bit
ian-mcdowell 872573a
Fix for missing libtext.dylib & share reading from stdin (#90)
ian-mcdowell 55804dc
Added ls colors test
ian-mcdowell 3d36b8c
Added CommandExecutorTests, ls & cat tests
ian-mcdowell 569865f
Merge branch 'master' into carriage
ian-mcdowell f474440
Performance improvements for ANSITextState
ian-mcdowell c577698
No longer mess with process stdout/stderr since it causes bugs
ian-mcdowell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// | ||
// Dispatch+Custom.swift | ||
// OpenTerm | ||
// | ||
// Created by Ian McDowell on 2/10/18. | ||
// Copyright © 2018 Silver Fox. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
extension DispatchQueue { | ||
|
||
/// Performs the given block on the main thread, without dispatching if already there. | ||
static func performOnMain(_ block: @escaping () -> Void) { | ||
if Thread.isMainThread { | ||
block() | ||
} else { | ||
DispatchQueue.main.async(execute: block) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now, switching background colors while terminal is open will not keep remnants of the background color visible where text was printed.