Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix double tab autocomplete list #61

Merged
merged 1 commit into from
Apr 19, 2019
Merged

Fix double tab autocomplete list #61

merged 1 commit into from
Apr 19, 2019

Conversation

MichaelKim
Copy link
Member

Two small things:

  1. In order to use getDirectory() in terminal-link.jsx, it needs the file system as a parameter. Previously, it was provided directly from the store state. This method is hacky, and is replaced with getting the file system using connect().
  2. On double tab, it was outputting the incorrect matched items due to reading from the wrong array of matches (workingDirectory.data vs matches).

@@ -78,7 +75,7 @@ class TerminalLink extends React.Component<Props, State> {
getCurrentInputCommand() {
const history = this.props.terminal.history;
return history[this.state.historyIndex];
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are some of these functions standard functions without semi colons and some are variables assigned to a function lambda (like onPaste) above? We should standardize that at some point.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's because class methods aren't bound normally, so the value of this can be undefined in callback methods. The assigned lambda is experimental syntax that automatically binds properly. More about that here: https://reactjs.org/docs/handling-events.html (about halfway down the page).

@MichaelKim MichaelKim merged commit 7f1fd9e into master Apr 19, 2019
@MichaelKim MichaelKim deleted the terminal-tab branch April 19, 2019 17:51
MichaelKim pushed a commit that referenced this pull request May 14, 2019
* Don't use spread operator (#32)

* Allow setting the font env variable to change the font (#35)

* Fixed calls to getPath not passing the right arguments, which breaks RM (#34)

* Fixed illegal border moves (#33)

* Fix flow (#36)

* Add flow types for global constants

* Add flow strict

* React update (#37)

* Update react and react-dom to v16

* Move scroll logic to separate component

* Fix paste not working (#38)

* Fix missing window select on extensions (#40)

* Fix clicking extensions not selecting window

* Remove console log

* Save backup in chrome storage (#41)

* Save backup in chrome storage

* Update descriptions for backup

* mercury: add windowPadding environment variable (#43)

This allows padding between windows to be adjusted, for if user wants to
customize it that way.

* Fix window select on render (#42)

* mercury: fix window shift and workspace deletion (#46)

* mercury: remove tab index (#45)

They're all set to 1 so it doesn't make sense why we have it. Also, it
doesn't actually focus the editor when you tab into it, and it shows an
ugly blue focused line when you click on it.

* mercurywm: fix no input and still remove outline (#47)

* mercurywm: improved render (#48)

- added support for CSS
- command is more versatile, taking in a list of files
- fixed absolute path calculation

* Update packages (#51)

* mercurywm: fix mkdir on root dir (#52)

* mercurywm: add alias command (#55)

* mercurywm: add alias command

* mercurywm: add error messages to alias and env

* mercurywm: window info padding and size in list (#56)

Change padding in the window info bottom bar so it doesn't overflow out
of the container, and add window sizes in `window list`

* add home/end key cursor movement (#59)

* mercurywm: fix consistency issue with fast key strokes (#60)

* mercurywm: fix consistency issue with fast key strokes

When the user types fast in the client, we update the cursor
locally, but wait for the server to update the history.

The message sent to the backend contains the full message
which leads to consistency issues because the client doesn't
update fast enough. This commit introduces a single source
of truth (the server), and the client simply sends change
events instead of updating the full string. This means
by the time the server processes all of the changes, and
react updates the client, we get the correct, consistent state.

* mercurywm: add types for flow

* Fix double tab autocomplete (#61)

* mercurywm: fix merge on two windows (#63)

* Fix alias flow (#64)

* Fix Flow with aliases

* Undo to single quotes

* mercurywm: overwrite default console with our own (#62)

Part of #10

* mercury: add test config for circleci (#66)

* Fix CircleCI Config Issues (#67)

* mercury: fix indentation

* mercurywm: remove node version to use latest

* CircleCI Publish to Web Store (#69)

* CircleCI publish to Web Store

* Add sudo to apt-get

* Add script for build-number and uploading artifacts to CI (#70)

* ci: add script to add build number

* ci: upload build artifacts to CI

* Version 2.0.1 (#71)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants