mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
fix various typos and grammar errors in comments (#834)
This commit is contained in:
parent
4d8cf7ba9a
commit
7e71bf356b
13 changed files with 40 additions and 33 deletions
|
|
@ -74,7 +74,7 @@ exports.subscribe = function (fn) {
|
|||
|
||||
exports.init = function () {
|
||||
// for backwards compatibility with hyperterm
|
||||
// (prior to the renme), we try to rename
|
||||
// (prior to the rename), we try to rename
|
||||
// on behalf of the user
|
||||
try {
|
||||
statSync(pathLegacy);
|
||||
|
|
|
|||
10
app/index.js
10
app/index.js
|
|
@ -34,7 +34,7 @@ app.config = config;
|
|||
app.plugins = plugins;
|
||||
app.getWindows = () => new Set([...windowSet]); // return a clone
|
||||
|
||||
// function to retrive the last focused window in windowSet;
|
||||
// function to retrieve the last focused window in windowSet;
|
||||
// added to app object in order to expose it to plugins.
|
||||
app.getLastFocusedWindow = () => {
|
||||
if (!windowSet.size) {
|
||||
|
|
@ -160,8 +160,8 @@ app.on('ready', () => installDevExtensions(isDev).then(() => {
|
|||
}
|
||||
|
||||
// app.windowCallback is the createWindow callback
|
||||
// that can be setted before the 'ready' app event
|
||||
// and createWindow deifinition. It's exeuted in place of
|
||||
// that can be set before the 'ready' app event
|
||||
// and createWindow deifinition. It's executed in place of
|
||||
// the callback passed as parameter, and deleted right after.
|
||||
(app.windowCallback || fn)(win);
|
||||
delete (app.windowCallback);
|
||||
|
|
@ -207,7 +207,7 @@ app.on('ready', () => installDevExtensions(isDev).then(() => {
|
|||
});
|
||||
|
||||
// TODO: this goes away when we are able to poll
|
||||
// for the title ourseleves, instead of relying
|
||||
// for the title ourselves, instead of relying
|
||||
// on Session and focus/blur to subscribe
|
||||
rpc.on('focus', ({uid}) => {
|
||||
const session = sessions.get(uid);
|
||||
|
|
@ -400,7 +400,7 @@ app.on('open-file', (event, path) => {
|
|||
} else if (!lastWindow && {}.hasOwnProperty.call(app, 'createWindow')) {
|
||||
app.createWindow(callback);
|
||||
} else {
|
||||
// if createWindow not exists yet ('ready' event was not fired),
|
||||
// If createWindow doesn't exist yet ('ready' event was not fired),
|
||||
// sets his callback to an app.windowCallback property.
|
||||
app.windowCallback = callback;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ export function sendSessionData(uid, data) {
|
|||
type: SESSION_USER_DATA,
|
||||
data,
|
||||
effect() {
|
||||
// If no uid is passed, data is sended to the active session.
|
||||
// If no uid is passed, data is sent to the active session.
|
||||
const targetUid = uid || getState().sessions.activeUid;
|
||||
rpc.emit('data', {uid: targetUid, data});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ export function showPreferences() {
|
|||
rpc.once('session data', () => {
|
||||
dispatch(sendSessionData(
|
||||
uid,
|
||||
// Leading space prevents command to be store in shell history
|
||||
// Leading space prevents command to be stored in shell history
|
||||
[' echo Attempting to open ~/.hyper.js with your \$EDITOR', // eslint-disable-line no-useless-escape
|
||||
' echo If it fails, open it manually with your favorite editor!',
|
||||
' bash -c \'exec env ${EDITOR:=' + editorFallback + '} ~/.hyper.js\'',
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ export default class Component extends React.Component {
|
|||
if (c) {
|
||||
// we compute the global name from the given
|
||||
// css class and we prepend the component name
|
||||
//
|
||||
// it's important classes never get mangled by
|
||||
// uglifiers so that we can avoid collisions
|
||||
const component = this.constructor.name
|
||||
|
|
|
|||
|
|
@ -167,6 +167,7 @@ export default class SplitPane extends Component {
|
|||
|
||||
// this shim is used to make sure mousemove events
|
||||
// trigger in all the draggable area of the screen
|
||||
//
|
||||
// this is not the case due to hterm's <iframe>
|
||||
shim: {
|
||||
position: 'fixed',
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ hterm.defaultStorage = new lib.Storage.Memory();
|
|||
|
||||
// Provide selectAll to terminal viewport
|
||||
hterm.Terminal.prototype.selectAll = function () {
|
||||
// We need to clear dom range to reset anchorNode
|
||||
// We need to clear the DOM range to reset anchorNode
|
||||
selection.clear(this);
|
||||
selection.all(this);
|
||||
};
|
||||
|
|
@ -207,7 +207,7 @@ hterm.Terminal.prototype.onMouse_ = function (e) {
|
|||
return oldOnMouse.call(this, e);
|
||||
};
|
||||
|
||||
// sine above we're no longer relying on `preventDefault`
|
||||
// since above we're no longer relying on `preventDefault`
|
||||
// to avoid selections, we use css instead, so that
|
||||
// focus is not lost, but selections are still not possible
|
||||
// when the appropiate VT mode is set
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ const reducer = (state = initial, action) => {
|
|||
case CONFIG_RELOAD: // eslint-disable-line no-case-declarations
|
||||
const {config} = action;
|
||||
state_ = state
|
||||
// we unset the user font size override if the
|
||||
// unset the user font size override if the
|
||||
// font size changed from the config
|
||||
.merge((() => {
|
||||
const ret = {};
|
||||
|
|
@ -183,7 +183,7 @@ const reducer = (state = initial, action) => {
|
|||
break;
|
||||
|
||||
case SESSION_RESIZE:
|
||||
// We only care about the sizes
|
||||
// only care about the sizes
|
||||
// of standalone terms (i.e. not splits):
|
||||
if (!action.isStandaloneTerm) {
|
||||
break;
|
||||
|
|
@ -233,7 +233,7 @@ const reducer = (state = initial, action) => {
|
|||
break;
|
||||
}
|
||||
|
||||
// we ignore activity markers that are within
|
||||
// ignore activity markers that are within
|
||||
// proximity of a resize event, since we
|
||||
// expect to get data packets from the resize
|
||||
// of the ptys as a result
|
||||
|
|
@ -294,8 +294,7 @@ const reducer = (state = initial, action) => {
|
|||
break;
|
||||
}
|
||||
|
||||
// we check that if any of the font size values changed
|
||||
// we show a notification
|
||||
// Show a notification if any of the font size values have changed
|
||||
if (CONFIG_LOAD !== action.type) {
|
||||
if (state_.fontSize !== state.fontSize ||
|
||||
state_.fontSizeOverride !== state.fontSizeOverride) {
|
||||
|
|
|
|||
14
lib/utils/effects.js
vendored
14
lib/utils/effects.js
vendored
|
|
@ -1,9 +1,11 @@
|
|||
// simple redux middleware that executes
|
||||
// the `effect` field if provided in an action
|
||||
// since this is preceded by the `plugins`
|
||||
// middleware, it allows authors to interrumpt,
|
||||
// defer or add to existing side effects at will
|
||||
// as the result of an action being triggered
|
||||
/**
|
||||
* Simple redux middleware that executes
|
||||
* the `effect` field if provided in an action
|
||||
* since this is preceded by the `plugins`
|
||||
* middleware. It allows authors to interrupt,
|
||||
* defer or add to existing side effects at will
|
||||
* as the result of an action being triggered.
|
||||
*/
|
||||
|
||||
export default () => next => action => {
|
||||
const ret = next(action);
|
||||
|
|
|
|||
|
|
@ -1,10 +1,14 @@
|
|||
// Based on https://github.com/kevva/executable
|
||||
// Since this module doesn't expose the function to check stat mode only,
|
||||
// his logic is pasted here.
|
||||
// Opened an issue and a pull request about it,
|
||||
// to maybe switch to module in the future:
|
||||
// Issue: https://github.com/kevva/executable/issues/9
|
||||
// PR: https://github.com/kevva/executable/pull/10
|
||||
/*
|
||||
* Based on https://github.com/kevva/executable
|
||||
* Since this module doesn't expose the function to check stat mode only,
|
||||
* his logic is pasted here.
|
||||
*
|
||||
* Opened an issue and a pull request about it,
|
||||
* to maybe switch to module in the future:
|
||||
*
|
||||
* Issue: https://github.com/kevva/executable/issues/9
|
||||
* PR: https://github.com/kevva/executable/pull/10
|
||||
*/
|
||||
|
||||
export function isExecutable(fileStat) {
|
||||
if (process.platform === 'win32') {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* Keyboard event keyCodes have proven to be really unreliable.
|
||||
* This util function will cover most of the edge cases where
|
||||
* String.fromCharCode() will not work
|
||||
* String.fromCharCode() doesn't work.
|
||||
*/
|
||||
|
||||
const _toAscii = {
|
||||
|
|
@ -54,7 +54,7 @@ const _arrowKeys = {
|
|||
/**
|
||||
* This fn takes a keyboard event and returns
|
||||
* the character that was pressed. This fn
|
||||
* purposely doens't take into account if the alt/meta
|
||||
* purposely doesn't take into account if the alt/meta
|
||||
* key was pressed.
|
||||
*/
|
||||
export default function fromCharCode(e) {
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ let termGroupPropsDecorators;
|
|||
let propsDecorators;
|
||||
let reducersDecorators;
|
||||
|
||||
// the fs locations where usr plugins are stored
|
||||
// the fs locations where user plugins are stored
|
||||
const {path, localPath} = plugins.getBasePaths();
|
||||
|
||||
const clearModulesCache = () => {
|
||||
|
|
@ -52,7 +52,7 @@ const clearModulesCache = () => {
|
|||
// clear require cache
|
||||
for (const entry in window.require.cache) {
|
||||
if (entry.indexOf(path) === 0 || entry.indexOf(localPath) === 0) {
|
||||
// `require` is webpacks', `window.require`, electron's
|
||||
// `require` is webpacks', `window.require` is electron's
|
||||
delete window.require.cache[entry];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// clear selection range of current selected term view
|
||||
// Clear selection range of current selected term view
|
||||
// Fix event when terminal text is selected and keyboard action is invoked
|
||||
exports.clear = function (terminal) {
|
||||
terminal.document_.getSelection().removeAllRanges();
|
||||
|
|
|
|||
Loading…
Reference in a new issue