1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-12-25 11:33:35 +03:00

blinking cursor (fixes #191)

This commit is contained in:
Eugene Pankov 2017-10-07 18:07:57 +02:00
parent 38cda117e2
commit 6c884e090c
3 changed files with 57 additions and 26 deletions

View File

@ -247,34 +247,59 @@
)
.form-group
label Terminal bell
br
div(
'[(ngModel)]'='config.store.terminal.bell',
(ngModelChange)='config.save()',
ngbRadioGroup
)
label.btn.btn-secondary(ngbButtonLabel)
input(
type='radio',
ngbButton,
[value]='"off"'
.d-flex
.mr-3
label Terminal bell
br
div(
'[(ngModel)]'='config.store.terminal.bell',
(ngModelChange)='config.save()',
ngbRadioGroup
)
| Off
label.btn.btn-secondary(ngbButtonLabel)
input(
type='radio',
ngbButton,
[value]='"visual"'
label.btn.btn-secondary(ngbButtonLabel)
input(
type='radio',
ngbButton,
[value]='"off"'
)
| Off
label.btn.btn-secondary(ngbButtonLabel)
input(
type='radio',
ngbButton,
[value]='"visual"'
)
| Visual
label.btn.btn-secondary(ngbButtonLabel)
input(
type='radio',
ngbButton,
[value]='"audible"'
)
| Audible
div
label Blink cursor
br
div(
'[(ngModel)]'='config.store.terminal.cursorBlink',
(ngModelChange)='config.save()',
ngbRadioGroup
)
| Visual
label.btn.btn-secondary(ngbButtonLabel)
input(
type='radio',
ngbButton,
[value]='"audible"'
)
| Audible
label.btn.btn-secondary(ngbButtonLabel)
input(
type='radio',
ngbButton,
[value]='false'
)
| Off
label.btn.btn-secondary(ngbButtonLabel)
input(
type='radio',
ngbButton,
[value]='true'
)
| On
.form-group
label Session persistence

View File

@ -322,6 +322,7 @@ export class TerminalTabComponent extends BaseTabComponent {
preferenceManager.set('copy-on-select', false)
preferenceManager.set('alt-sends-what', 'browser-key')
preferenceManager.set('alt-gr-mode', 'ctrl-alt')
preferenceManager.set('cursor-blink', config.terminal.cursorBlink)
if (config.terminal.colorScheme.foreground) {
preferenceManager.set('foreground-color', config.terminal.colorScheme.foreground)
@ -368,6 +369,10 @@ export class TerminalTabComponent extends BaseTabComponent {
beam: hterm.hterm.Terminal.cursorShape.BEAM,
}[config.terminal.cursor]
this.hterm.applyCursorShape()
this.hterm.setCursorBlink(config.terminal.cursorBlink)
if (config.terminal.cursorBlink) {
this.hterm.onCursorBlink_()
}
}
zoomIn () {

View File

@ -11,6 +11,7 @@ export class TerminalConfigProvider extends ConfigProvider {
background: 'theme',
ligatures: false,
cursor: 'block',
cursorBlink: true,
customShell: '',
colorScheme: {
__nonStructural: true,