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

readline,repl: add substring history search #31112

Closed

Commits on Jan 8, 2020

  1. repl: improve preview length calculation

    The preview had an off by one error in case colors where deactivated
    and did not take fullwidth unicode characters into account when
    displaying the preview.
    BridgeAR committed Jan 8, 2020
    Copy the full SHA
    05c19bd View commit details
    Browse the repository at this point in the history
  2. readline,repl: add substring based history search

    This improves the current history search feature by adding substring
    based history search similar to ZSH. In case the `UP` or `DOWN`
    buttons are pressed after writing a few characters, the start string
    up to the current cursor is used to search the history.
    
    All other history features work exactly as they used to.
    
    Fixes: nodejs#28437
    BridgeAR committed Jan 8, 2020
    Copy the full SHA
    470e87f View commit details
    Browse the repository at this point in the history
  3. readline,repl: skip history entries identical to the current line

    Skip history entries that are identical to the currently visible line
    to improve the user experience.
    BridgeAR committed Jan 8, 2020
    Copy the full SHA
    6efc2b9 View commit details
    Browse the repository at this point in the history
  4. readline,repl: improve history up/previous

    Reaching the history end caused the last entry to be persistent.
    That way there's no actualy feedback to the user that the history
    end is reached. Instead, visualize the original input line and keep
    the history index at the history end in case the user wants to go
    back again.
    BridgeAR committed Jan 8, 2020
    Copy the full SHA
    5a213fe View commit details
    Browse the repository at this point in the history
  5. readline: simplify getStringWidth()

    Simplify getStringWidth by removing dead code (the options were
    unused) and by refactoring the logic.
    BridgeAR committed Jan 8, 2020
    Copy the full SHA
    3b8315c View commit details
    Browse the repository at this point in the history
  6. readline: move charLengthLeft() and charLengthAt()

    This moves the charLengthLeft() and charLengthAt() into the internal
    readline file. This allows sharing the functions internally with
    other code.
    BridgeAR committed Jan 8, 2020
    Copy the full SHA
    d6b1bac View commit details
    Browse the repository at this point in the history
  7. src: improve GetColumnWidth performance

    This improves the performance in GetColumnWidth for full width
    characters.
    BridgeAR committed Jan 8, 2020
    Copy the full SHA
    9f7730e View commit details
    Browse the repository at this point in the history
  8. src: change GetStringWidth's expand_emoji_sequence option default

    The option is now set to true by default. Most terminals do not have
    full emoji support and visualize emojis with zero width joiners as
    individual emojis.
    Also verify that at least one argument is always passed through to the
    function and remove support for passing through code points. Only
    accept strings from now on to simplify the API.
    BridgeAR committed Jan 8, 2020
    Copy the full SHA
    e9bc956 View commit details
    Browse the repository at this point in the history
  9. Copy the full SHA
    6dd223b View commit details
    Browse the repository at this point in the history
  10. repl: activate previews for lines exceeding the terminal columns

    This improves the completion previews by activating them for lines
    that exceed the current terminal columns.
    As a drive-by fix it also simplifies some statements.
    BridgeAR committed Jan 8, 2020
    Copy the full SHA
    26d4643 View commit details
    Browse the repository at this point in the history
  11. test: add repl tests to verify unicode support in previews

    This also adds a test to verify that changed writer options also
    change the preview output depending on the options.
    BridgeAR committed Jan 8, 2020
    Copy the full SHA
    387a327 View commit details
    Browse the repository at this point in the history
  12. Copy the full SHA
    9f5aa54 View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2020

  1. squash: readline: simplify getStringWidth()

    readline: improve getStringWidth on non-Intl builds
    
    The getStringWidth function returned the wrong width for multiple
    inputs. It's now improved by supporting various zero width characters
    and more full width characters.
    BridgeAR committed Jan 9, 2020
    Copy the full SHA
    f278c06 View commit details
    Browse the repository at this point in the history
  2. fixup

    BridgeAR committed Jan 9, 2020
    Copy the full SHA
    b1879aa View commit details
    Browse the repository at this point in the history