Commit Graph

745 Commits

Author SHA1 Message Date
Daniel Imms
f2f0f460c4 Add a bunch of tests 2016-06-10 18:53:32 -07:00
Daniel Imms
08928d8b8e Merge remote-tracking branch 'upstream/master' into linkify_ip_addr 2016-06-10 18:08:39 -07:00
Daniel Imms
cb4728f8f5 Tidy up code 2016-06-10 18:05:24 -07:00
Daniel Imms
4a71a41380 Fix cursor blinking when enabled
Fixes #119
2016-06-10 18:05:13 -07:00
Daniel Imms
9c3b1105e2 Check optional port clause after domain too 2016-06-10 13:15:59 -07:00
Daniel Imms
edf897182e Bound refresh max rows to this.rows not this.lines
this.row is the size of rows in the viewport, this.lines is the buffer. It's
only possible to refresh `0` to `this.rows - 1`.

Fixes #86
2016-06-10 13:08:43 -07:00
Paris Kasidiaris
7c1559b8ad Merge pull request #60 from runarberg/master
Fix cross platform input problems
2016-06-10 19:32:45 +03:00
runarberg
b01165c1f8 Fix third level shifts for Mac OS and windows
ISO third level keys were not working. That prevented some inputting
important characters (like pipe `|` and caret `^`) on some keyboard
layouts.

Instead of parsing the user-agent string to find the users os, we now
look into the `platform` attribute of the `navigator` object.

Removed the hijacking of the command key `⌘` on Mac OS as the `Alt` key
on other systems.
2016-06-10 16:14:31 +00:00
Paris Kasidiaris
b5d9c6b113 Merge pull request #115 from sourcelair/decimal-terminal-flags
Stop using binary literals
2016-06-10 19:07:25 +03:00
Paris
5a56849df8 Stop using binary literals. Non ES6 compatible 2016-06-10 19:02:49 +03:00
Paris Kasidiaris
c908f849c5 Merge pull request #114 from sourcelair/fix-copy-nbsp
Stop copying non-breaking spaces into clipboard
2016-06-10 17:05:10 +03:00
Paris
fed92ac5c8 Implement tests 2016-06-10 16:35:56 +03:00
Paris
00f4232ecc Export copied text processing to static method 2016-06-10 16:27:58 +03:00
Paris
fa1cd89aa9 Fix copying of non-breaking spaces 2016-06-10 16:17:14 +03:00
Antonis Kalipetis
5193f4fae0 Merge pull request #109 from Tyriar/65_send_ctrl_l_r_key
Jump over words with ctrl+left/right
2016-06-10 15:57:10 +03:00
Daniel Imms
740ae96f5f Merge remote-tracking branch 'upstream/master' into 65_send_ctrl_l_r_key 2016-06-10 03:00:22 -07:00
Paris Kasidiaris
55ca998224 Merge pull request #110 from Tyriar/64_cursor_disappears_when_scrolling
Draw cursor at correct position when scrolling
2016-06-10 12:22:28 +03:00
Paris Kasidiaris
fdff1ca793 Merge pull request #107 from runarberg/fix/ctrl-or-shift-insert-copy-pasting
Allow Ctrl/Shift + insert to copy/paste on windows and linux
2016-06-10 11:57:15 +03:00
Paris Kasidiaris
fa729b8306 Merge pull request #112 from Tyriar/111_scroll_with_blank_lines_after_cursor
Improve scroll to work with blank lines after the cursor
2016-06-10 11:40:08 +03:00
Daniel Imms
eee99f62e1 Improve scroll to work with blank lines after the cursor
This commit works fixes scrolling when there were blank lines after the cursor.
Here is what it does (blank rows are those added by running `clear`):

when increasing rows:
  if there are blank rows below the cursor:
    add a blank row to the bottom
  else if there is room in the buffer above the viewport
    scroll up
  else
    add a blank row to the bottom

when decreasing rows:
  if there are blank rows below the cursor:
    remove a blank row from the bottom
  else
    scroll down

Fixes #111
2016-06-09 21:13:48 -07:00
Daniel Imms
da9f86f1a7 Draw cursor at correct position when scrolling
Fixes #64
2016-06-09 19:59:59 -07:00
Daniel Imms
0535f9425b More escape sequence tests 2016-06-09 19:25:29 -07:00
Daniel Imms
c86fd87819 Add tests for F-keys 2016-06-09 19:00:40 -07:00
Daniel Imms
3a866cf202 Refactor escape sequence code and add tests 2016-06-09 18:41:54 -07:00
Daniel Imms
e2aaa8d362 Jump over words with ctrl+left/right
Escape codes used: 5=ctrl, C=right, D=left

Fixes #65
2016-06-09 18:01:12 -07:00
runarberg
524db02228 Fix Ctrl/Shift + insert copy/paste
Many systems (including MS Windows and many linuxes) map `<Ctrl>` +
`<Insert>` to copy and `<Shift> + <Insert>` to paste. That serves as a
handy fallback when the more common `<Ctrl> + C` and `<Ctrl> + V`
keybindings have their default prevented to send signals to the
terminal.

Currently all keydown-events with the insert key send `\x1b[2~` to the
terminal. This commit won't send that key if either the `shiftKey` or
the `ctrlKey` are present. Instead it will enable `contentEditable` to
allow for pasting.
2016-06-09 13:45:02 +00:00
Paris Kasidiaris
cf9d2348a1 Merge pull request #97 from Tyriar/redundant_resize
Don't resize when unnecessary
2016-06-09 10:53:16 +03:00
Paris Kasidiaris
92122bf29b Merge pull request #105 from sourcelair/issue/46
Introduce testing environment for xterm.js
2016-06-09 10:29:34 +03:00
Paris
abb7a49584 Add CXX environment 2016-06-09 10:22:49 +03:00
Paris
beff0db301 Add apt addon in travis for node-gyp dependency of pty.js 2016-06-09 10:18:39 +03:00
Paris
ab1526b085 Add travis ci build status in xterm.js 2016-06-09 10:10:36 +03:00
Paris
b91e737017 Add .travis.yml 2016-06-09 10:08:44 +03:00
Paris
fa093e2bd2 Set up environment for testing 2016-06-09 10:04:53 +03:00
Paris Kasidiaris
2f001f8af9 Merge pull request #102 from Tyriar/dont_crash_demo_refresh
Don't crash demo server on refresh
2016-06-09 09:49:28 +03:00
Paris
f87300d30e Remove old test-suite completely 2016-06-09 09:49:11 +03:00
Paris Kasidiaris
04ae96617d Merge pull request #101 from Tyriar/fix_resize_buffer
Fix buffer corruption after resizing rows
2016-06-09 09:13:06 +03:00
Daniel Imms
7a80efd8bd Don't crash demo server on refresh
Fixes #100
2016-06-08 19:28:55 -07:00
Daniel Imms
df268ad5cd Fix buffer corruption after resizing rows
Lines from the buffer were incorrectly being removed when the viewport was
resized. This change removes the lines when the cursor is above them, if not it
shifts the viewport down. Some basic jsdoc comments were added to some Terminal
properties for future reference.

Fixes #98
Fixes #99
2016-06-08 19:08:32 -07:00
Daniel Imms
e721bdc9f0 Don't resize when unnecessary 2016-06-08 17:38:34 -07:00
Paris Kasidiaris
ae99ad83d0 Merge pull request #84 from sourcelair/fix/terminal-focus-event
Fix emission of terminal focus&blur events
2016-06-09 00:00:05 +03:00
Paris Kasidiaris
c491537de1 Merge pull request #95 from sourcelair/issue/85
Stop marking spans as `inline-block`
2016-06-08 22:09:21 +03:00
Paris
383d59bbc3 Stop marking spans as inline-block (not needed after 670b179140)
Fix #85
2016-06-08 22:03:45 +03:00
Paris Kasidiaris
2471910244 Merge pull request #94 from Tyriar/patch-2
Add section on addons to README
2016-06-08 21:30:34 +03:00
Daniel Imms
2a36ff0839 Merge remote-tracking branch 'upstream/master' into patch-2 2016-06-07 23:34:35 -07:00
Paris Kasidiaris
136c838f30 Merge pull request #89 from Tyriar/readme_demo
Add demo section to README
2016-06-08 09:19:18 +03:00
Paris Kasidiaris
bd3936cc9f Merge pull request #88 from Tyriar/patch-1
Add http:// to demo output address
2016-06-08 09:17:49 +03:00
Daniel Imms
dab80b58ae Add section on addons to README 2016-06-07 22:31:39 -07:00
Daniel Imms
23cfa3d824 Add IP addresses to linkify
Fixes #91
2016-06-07 22:12:38 -07:00
Daniel Imms
289ff8092d Add demo section to README
Fixes #87
2016-06-07 17:08:37 -07:00
Daniel Imms
47b01786e2 Add http:// to demo output address
This makes it easy to launch the demo in a browser by right clicking the URL in
gnome-terminal
2016-06-07 16:43:33 -07:00