mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Merge pull request #1160 from Tyriar/1159_linefeed
Make lineFeed event lowercase
This commit is contained in:
@@ -63,7 +63,7 @@ namespace methods_core {
|
|||||||
// no arg
|
// no arg
|
||||||
t.on('blur', () => {});
|
t.on('blur', () => {});
|
||||||
t.on('focus', () => {});
|
t.on('focus', () => {});
|
||||||
t.on('lineFeed', () => {});
|
t.on('linefeed', () => {});
|
||||||
t.on('selection', () => {});
|
t.on('selection', () => {});
|
||||||
// args
|
// args
|
||||||
t.on('data', () => {});
|
t.on('data', () => {});
|
||||||
@@ -89,7 +89,7 @@ namespace methods_core {
|
|||||||
// no arg
|
// no arg
|
||||||
t.off('blur', () => {});
|
t.off('blur', () => {});
|
||||||
t.off('focus', () => {});
|
t.off('focus', () => {});
|
||||||
t.off('lineFeed', () => {});
|
t.off('linefeed', () => {});
|
||||||
t.off('selection', () => {});
|
t.off('selection', () => {});
|
||||||
// args
|
// args
|
||||||
t.off('data', () => {});
|
t.off('data', () => {});
|
||||||
|
|||||||
+2
-2
@@ -134,9 +134,9 @@ export class InputHandler implements IInputHandler {
|
|||||||
/**
|
/**
|
||||||
* This event is emitted whenever the terminal outputs a LF or NL.
|
* This event is emitted whenever the terminal outputs a LF or NL.
|
||||||
*
|
*
|
||||||
* @event lineFeed
|
* @event linefeed
|
||||||
*/
|
*/
|
||||||
this._terminal.emit('lineFeed');
|
this._terminal.emit('linefeed');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export function winptyCompatInit(terminal): void {
|
|||||||
// space. This is certainly not without its problems, but generally on
|
// space. This is certainly not without its problems, but generally on
|
||||||
// Windows when text reaches the end of the terminal it's likely going to be
|
// Windows when text reaches the end of the terminal it's likely going to be
|
||||||
// wrapped.
|
// wrapped.
|
||||||
terminal.on('lineFeed', () => {
|
terminal.on('linefeed', () => {
|
||||||
const line = terminal.buffer.lines.get(terminal.buffer.ybase + terminal.buffer.y - 1);
|
const line = terminal.buffer.lines.get(terminal.buffer.ybase + terminal.buffer.y - 1);
|
||||||
const lastChar = line[terminal.cols - 1];
|
const lastChar = line[terminal.cols - 1];
|
||||||
|
|
||||||
|
|||||||
Vendored
+2
-2
@@ -218,7 +218,7 @@ declare module 'xterm' {
|
|||||||
* @param type The type of the event.
|
* @param type The type of the event.
|
||||||
* @param listener The listener.
|
* @param listener The listener.
|
||||||
*/
|
*/
|
||||||
on(type: 'blur' | 'focus' | 'lineFeed' | 'selection', listener: () => void): void;
|
on(type: 'blur' | 'focus' | 'linefeed' | 'selection', listener: () => void): void;
|
||||||
/**
|
/**
|
||||||
* Registers an event listener.
|
* Registers an event listener.
|
||||||
* @param type The type of the event.
|
* @param type The type of the event.
|
||||||
@@ -273,7 +273,7 @@ declare module 'xterm' {
|
|||||||
* @param type The type of the event.
|
* @param type The type of the event.
|
||||||
* @param listener The listener.
|
* @param listener The listener.
|
||||||
*/
|
*/
|
||||||
off(type: 'blur' | 'focus' | 'lineFeed' | 'selection' | 'data' | 'key' | 'keypress' | 'keydown' | 'refresh' | 'resize' | 'scroll' | 'title' | string, listener: (...args: any[]) => void): void;
|
off(type: 'blur' | 'focus' | 'linefeed' | 'selection' | 'data' | 'key' | 'keypress' | 'keydown' | 'refresh' | 'resize' | 'scroll' | 'title' | string, listener: (...args: any[]) => void): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resizes the terminal.
|
* Resizes the terminal.
|
||||||
|
|||||||
Reference in New Issue
Block a user