Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/fixes' into yury
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Cabanero committed Feb 8, 2018
2 parents 8941ada + a4cf955 commit c9b7b18
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 18 deletions.
6 changes: 6 additions & 0 deletions Blink/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,15 @@ @implementation AppDelegate {
UIBackgroundTaskIdentifier _suspendTaskId;
BOOL _suspendedMode;
}

void _on_pipebroken_signal(int signum){
NSLog(@"PIPE is broken");
}

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
signal(SIGPIPE, _on_pipebroken_signal);

[[BKTouchIDAuthManager sharedManager]registerforDeviceLockNotif];
// Override point for customization after application launch.
#if HOCKEYSDK
Expand Down
5 changes: 5 additions & 0 deletions Blink/SpaceController.m
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,11 @@ - (void)controlPanelOnClose

- (void)copy:(id)sender
{
// Accessibility speak try to copy selection. (notices on iphone)
if (sender == nil) {
return;
}

[_termInput copy: sender];
}

Expand Down
9 changes: 9 additions & 0 deletions Resources/hterm_all.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ function setNodeText(node, text, opt_wcwidth) {
node.textContent = text;

if (node.nodeType === Node.TEXT_NODE) {

var parent = node.parentNode;
var next = node.nextSibling;

if (parent) {
parent.removeChild(node);
parent[next ? "insertBefore":"appendChild"](node, next);
}

return;
}

Expand Down
3 changes: 2 additions & 1 deletion Resources/hterm_all.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 12 additions & 17 deletions Resources/hterm_all.patches.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,9 @@ hterm.Screen.prototype.deleteChars = function(count) {
var node = this.cursorNode_;
var offset = this.cursorOffset_;

var currentCursorColumn = this.cursorPosition.column;
count = Math.min(count, this.columnCount_ - currentCursorColumn);
if (!count) return 0;
// var currentCursorColumn = this.cursorPosition.column;
// count = Math.min(count, this.columnCount_ - currentCursorColumn);
// if (!count) return 0;

var rv = count;
var startLength, endLength;
Expand Down Expand Up @@ -410,21 +410,16 @@ hterm.Screen.prototype.overwriteString = function(str, wcwidth = undefined) {
this.cursorPosition.column += wcwidth;
return;
}


var node = this.cursorRowNode_;
var parent = this.cursorRowNode_.parentNode;
var next = this.cursorRowNode_.nextSibling

if (parent) {
parent.removeChild(node);
}

this.deleteChars(Math.min(wcwidth, maxLength));
this.insertString(str, wcwidth);

if (parent) {
parent[next ? "insertBefore":"append"](node, next);
// Blink optimization: Nothing to delete, just insert
if (this.cursorOffset_ === 0 &&
this.cursorPosition.column === 0 &&
this.cursorRowNode_.textContent.length === 0) {
this.insertString(str, wcwidth);
} else {
// Blink optimization: if we insert first. It is more likly we will match text
this.insertString(str, wcwidth);
this.deleteChars(wcwidth);
}
};

Expand Down

0 comments on commit c9b7b18

Please sign in to comment.