`Array.prototype.some` short-circuits when a value is true which is better for performance and makes the intention more clear. Native `String.prototype.includes` is easier to read.
Now reading it as English, "if some argument includes 'verbose'"...
* Tokenize rendered cells based on style and whitespace
* Manually evaluate system font files to determine character sequences to render together
* Render ligatures as one single token in the WebGL Atlas
* Use font weight setting in the WebGL Renderer
* Prefill atlas with the visible ASCII characters for optimization
* Simplify lookup of rendered glyph information
* Code style adjustments and refactorings for readability
This is a fix for some of the issues raised in #2414. One thing to note - there was some question as to whether win32yank works for everyone. I did find a possible workaround for that, if it's still an issue:
```
const textToPaste = clipboard.readText()
const sanitizedTextLines = replaceAll(textToPaste, { "'": "''" })
await neovimInstance.command("let @+='" + sanitizedTextLines + "'")
```
I don't have a windows box to test this on, so perhaps we can add this code to `NeovimEditorCommands. pasteContents` later if needed.
* Basic code highlights.
* Check if the given language is valid, use auto highlight if not.
* Fix check.
* Set baseUrl as well.
Unrelated to code blocks, but fixes#1653 and is a single line change in the options I've added.
* Bump marked types package number.
* Move style sheet to only markdown preview.
* Swap theme to option.
* Fix review comment from previous PR.
* Fix nohighlights.
* Update tests for Markdown preview.
* Fix lint error.
* Add config option for syntax highlights.
As part of fleshing out the VCS this pr adds the ability to commit a file using the git sidebar.
Additions:
* Menu command toggle vcs visibility
* Recent Commits Section: commits made whilst in oni (later might be preferable to get a git log rather than commits from oni)
* Commiting: see below
![vcs_commit](https://user-images.githubusercontent.com/22454918/43024011-bd3e27ac-8c64-11e8-8d2e-944047d7ed8d.gif)
* Try removing some unneeded folders from the build.
* Delete random new file.
* Update ignore list further.
* Swap to explicitly listing required files/folders.
* Very first version of new CLI.
* Hook up calling on Windows.
* Try for Mac and Linux.
Need to test on Mac.
* Fix mac path.
* Small changes to CLI script.
* Fix bin pointing to CLI.
* Clarify changes in cli_args.
* Update Registry key check.
* Update Windows installer to get around path issues.
* Update Mac add to PATH command.
* Fix logic error.
* Fix a few small Markdown preview issues.
* Close markdown preview on exit.
* Update marked version.
* Add config option for auto scroll.
* Keep focus on initial split.
* Fix toggle function.
Before the fix was only applied to close.
* Hook up clicking a link to open the Oni browser if activated.
Fixes#2021.
* Fix lint error.
* Update for changed API.
* Update tests.
* Bump package number.
* Update lock file.
* Syntax change.
Currently you can quit Oni with Command+Q, but only if a window is
currently open. If you close all windows, e.g. by `:q`ing all tabs, the
app is left running but Command+Q will no longer quit the app, and you
have to press the Oni->Exit menu item.
Adding this accelerator here allows the app to be closed via the the
standard shortcut regardless of whether there are currently any windows
open.
* Initial change to fix drag and drop.
* Refactor to use the existing openFile method that takes user config into account.
Removed old _openFiles method since it wasn't needed anymore.
Removed un-used VimL function too.
* Add debug loggin to electron builder
* Move environment variable to shell script
* Remove setting environment variables in travis.yml
* Update exporting of DEBUG variable
* Additional logging and stop logic
* Remove 'window' from setTimeout, since window isn't around in a node environment
* Revert changes to travis-build
* First messy attempt at moving around Oni windows.
* Make slightly smarter.
* Tidy up.
* Fixed passing of direction.
Also check that there are valid windows to swap to, both initially and after filtering.
* Tidy up by moving to new file.
* Ignore minimized windows.
Not sure if this should be the default or not.
Is possible we could hook up a config option and pass that over the IPC to here to make it configurable.
* Add to OniEditor for now.
* Remove temp commands.
* Fix lint issues.
* Remove main window from main.ts
Added function to get current active window, and renamed main window to currentWindow.
* Extend the logic of window swapping to check the main axis first.
I.e. always move to the closest window on the right.
* Fix lint issues.
* Setup main unit tests.
* Change code to make it more easily unit-testable.
* Add first set of tests.
* Add further tests.
* Tidy up tests.
* Remove from OniEditor.
* Wire up in index.tsx.
* Fix process closing logic on OSX
* Don't kill node...
* Kill chromedriver processes too
* Set up automation to ignore single instance mode
* Disable single instance mode in automation
* Tweaks to improve logging / closing
* Additional logging for stop method
* Don't gate on single instance for OSX tests
* Fix lint issues
* Don't change process stop behavior
* Run prettier on all files in the repo
* Temporarily remove pre-push hook
* Start tweaking settings to get lint passing
* Fix some tslint errors
* Fix lint issues
* Disable align rule, since prettier takes care of that for us
* Add prepush rule back
* Fix test lint error
* return main window and create one if unavailable
* hide window on "close" so object not destroyed
* add accelarator options
* explicitly pass in focused window to menu clicks
* create fn ensure window always exists
* use browser window for oni command
* create ref to main window to use on activate
* Fix incorrect conditional for windows.length
* fix unintentional command rename
* re-add old conditional with better ordering
* remove hiding functionality
* Fix rename bugs remove traces of quitting state
* add delayed event sending
* add event on oni.started listened for in main
* send delayed event to main process
* create dryer wrapper fn
* switch to using once method for ipcMain
* revert changes to oni.sh
* finish reverting oni.sh changes
* add filetype associations for os recognition
* fix json errors
* fix moar json errors
* add fileopen command
* refine file open functionality
include check to see if valid path can be created
if so open with valid path
* [WIP] add handler for responding to open-file
* add fileprotocol for electron
* add conditional to file protocol
* remove conditional add safer logs
* add is package to associations
remove args from activate create window
* fix typo and pass correct path to event handler
* Add environment check
* add json to filetypes
* remove logs
* replace mistakenly removed logs
* revert change start editor to minimise footprint
* add browserWindow variable
* add create window call
* add createwindow and open-file event
* remove false assignment
* add hide app command and bind to m-h
* use app.hide api
* fix import use remote.app
* add menu commands and show on activate
* Remove hide option from dock as it already exists
* Add save window state functionality
* add better error handling if no bounds
* ensure there is a default window state
* add further checks to ensure window.bounds
* ongoing tweaks in attempt to trace pack error
* remove defaults add logging
* fix mistaken if clause to catch falsy args
* remove logging and excessive conditionals
* add is maximised so can restart as maximized
* finalise functionality to save is maximised state
* Add 'set -e' flag to bash to tell it to bail if there is a non-zero exit code for any command
* Revert if inversion
* Remove extra new line
* Add timestamps, and bump uptimeout
* Remove unused stability tests
* Remove extra parentheses
* Ignore arguments passed from Spectron
* Add warning that arguments are being cleared
* Add a wait for startup to complete
* Fix start call
* Temporarily deactivate NoInstalledNeovim test to unblock CI
* Fix lint issue
* Add electron-settings
* Update background color
* Persist background color when it changes
* Clean up lint issues
* Move electron-settings out of development dependency
* Use main process for electron-settings instance
* Fix build issues
* add react dev tools
* less asyncification in a misguided..
attempt to debug if that causing the lack of cool tools
* upgrade electron-devtools-installer
add func to init tools async
* hookup redux store
* fix lint errors
* Create component + state management for window title, use frameless window on OSX
* Create connected component to store, hook up title
* Add 'title' colors and update 'onedark.json
* Only show window title on Mac
* Fix lint issues
* Derive the titlebar / background color from the theme color
* Some tweaks to improve font rendering
* Add 'redrawAll' method
* Add alpha condition based on whether there is a background image
* Maintain functionality for transparent background
* Refactoring to decouple the CanvasRenderer from needing to know about resize, or the delta tracking of cells
* Clean up lint issues
* Remove unused code in CanvasRenderer
* Remove extraneous comment
* Refactor Keyboard to take in an element
* Extract body of keyboard handler to separate method
* Factor out keyboard to <NeovimInput />
* Refactor keyboard input to separate component
* More input updates
* Initial work to add IME/dead key handling to keyboard input
* Handle composing case
* TEST COMMIT
* Revert test commit
* Some cleanup / refactoring
* Fix first round of lint issues
* Disable IME when not in insert mode
* Fix remaining lint issues
* Refactor logic so that RootComponent gets first pass at handling keyboard input
* Start cleaning up logic in NeovimInput
* Add FocusManager
* Remove 'capture' concept from input manager
* Fix mouse regression by setting pointer-events: none
* Fix exception due to null key
* Factor KeyboardInput to separate file
* Fix up props
* Clean up and consolidate logic in KeyboardInput; fix lint erros
* Fix composition issue on OSX
* Specify lineheight for cursor, to center highlighted text