Skip to content

Commit

Permalink
Disable insert mode on drag
Browse files Browse the repository at this point in the history
  • Loading branch information
neauoire committed Apr 15, 2019
1 parent d1b1ec9 commit 0e3cff8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions desktop/sources/scripts/cursor.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ function Cursor (terminal) {
}

this.drag = function (x, y) {
this.mode = 0
this.cut()
this.move(x, y)
this.paste()
Expand Down
6 changes: 3 additions & 3 deletions desktop/sources/scripts/terminal.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ function Terminal () {
this.drawInterface = function () {
const col = this.grid.w
// Cursor
this.write(`${this.cursor.x},${this.cursor.y}${this.cursor.mode === 2 ? '^' : this.cursor.mode === 1 ? '+' : ''}`, col * 0, 1, this.grid.w)
this.write(`${this.cursor.x},${this.cursor.y}${this.cursor.mode === 1 ? '+' : ''}`, col * 0, 1, this.grid.w, this.cursor.mode === 1 ? 1 : 2)
this.write(`${this.cursor.w}:${this.cursor.h}`, col * 1, 1, this.grid.w)
this.write(`${this.cursor.inspect()}`, col * 2, 1, this.grid.w)
this.write(`${this.orca.f}f${this.isPaused ? '*' : ''}`, col * 3, 1, this.grid.w)
Expand All @@ -176,15 +176,15 @@ function Terminal () {
this.write(`${this.orca.w}x${this.orca.h}`, col * 0, 0, this.grid.w)
this.write(`${this.grid.w}/${this.grid.h}`, col * 1, 0, this.grid.w)
this.write(`${this.source}`, col * 2, 0, this.grid.w)
this.write(`${this.clock}`, col * 3, 0, this.grid.w, this.io.midi.inputIndex > -1 ? 6 : 2)
this.write(`${this.clock}`, col * 3, 0, this.grid.w, this.io.midi.inputIndex > -1 ? 1 : 2)
this.write(`${this.io.inspect(this.grid.w)}`, col * 4, 0, this.grid.w)

if (this.orca.f < 25) {
this.write(`${this.io.midi}`, col * 5, 0, this.grid.w * 2)
}

if (this.commander.isActive === true) {
this.write(`${this.commander.query}${this.orca.f % 2 === 0 ? '_' : ''}`, col * 5, 1, this.grid.w * 2, 6)
this.write(`${this.commander.query}${this.orca.f % 2 === 0 ? '_' : ''}`, col * 5, 1, this.grid.w * 2, 1)
}
}

Expand Down

0 comments on commit 0e3cff8

Please sign in to comment.