Skip to content
Snippets Groups Projects
  1. Jul 29, 2017
  2. Jul 09, 2017
  3. Jul 04, 2017
  4. May 27, 2017
    • Mark Somerville's avatar
      Fix problem when reading terminal capabilities · fd882edc
      Mark Somerville authored
      
      An update to the terminfo entry for xterm-256color made between
      ncurses-6.0+20170128-1 and ncurses-6.0+20170429-1 on Arch highlights a
      problem with how terminal capabilities were being read and affects all
      users of rb-readline on Arch.
      
      The particular terminfo change was to alter the cr (carriage return)
      capability from:
      
        ^M
      
      to:
      
        \r
      
      The rb-readline code that parses the capabilities was mistakenly storing
      this capability as:
      
        \\r
      
      causing "\r" to be displayed when entering a line of input into an
      rb-readline program.
      
      While I am reasonably confident that this change is sound, I am
      concerned that there are other problems around the way terminal
      capabilities are parsed because this patch fixes only this specific
      case. Unfortunately, the `infocmp` line is a maze of regexes and escape
      characters and checking and reworking it requires more time than I have
      available just now.
      
      Fixes #138.
      
      Tested-by: Mark Somerville <mark@scottishclimbs.com> [Arch, MRI 2.4.1]
      Signed-off-by: default avatarMark Somerville <mark@scottishclimbs.com>
      fd882edc
  5. Feb 24, 2017
    • Adam Leff's avatar
      Fix NilClass error when stdin is not a terminal · 3e2f8510
      Adam Leff authored
      
      In some cases, such as when running tests under minitest, stdin
      can get remapped in such a way that shell-outs to commands like
      `stty -a` will report "stdin is not a terminal". This can cause
      the elements in @_rl_tty_chars to be nil.
      
      In #prepare_terminal_settings, rl_bind_key is called for function
      :rl_restart_output, but if @_rl_tty_chars.t_start is nil,
      StringScanner.new(seq) in rl_translate_keyseq will throw:
      
      ```
      Error: no implicit conversion of nil into String
      ```
      
      This appears to be the only case in the codebase where an unguarded
      call to rl_bind_key exists, so this change ensures that we do not
      try and map a nil key to :rl_restart_output.
      
      Signed-off-by: default avatarAdam Leff <adam@leff.co>
      3e2f8510
  6. Feb 10, 2017
  7. Feb 03, 2017
  8. Jan 12, 2017
  9. Dec 28, 2016
  10. Dec 02, 2016
  11. Nov 07, 2016
    • Chris's avatar
      Fix already initialized constant warnings · 1d4e43c8
      Chris authored
      In order to remove warnings when using this gem, this commit adds a
      couple checks to ensure that the constants aren't already defined when
      we try to assign them values. This ensures they are set once and only
      once.
      1d4e43c8
  12. Oct 12, 2016
  13. Oct 19, 2015
  14. Oct 18, 2015
  15. Sep 07, 2015
  16. Jun 03, 2015
  17. May 14, 2015
  18. Apr 02, 2015
  19. Dec 31, 2014
  20. Dec 29, 2014
  21. Oct 17, 2014
  22. Apr 01, 2014
  23. Mar 31, 2014
Loading