Git Product home page Git Product logo

Comments (5)

keith avatar keith commented on August 20, 2024

+1 Can reproduce locally in iTerm on OS X

from pick.

keith avatar keith commented on August 20, 2024

This still appears to be an issue with these steps:

  1. Open vim
  2. Open your pick search
  3. Hit CTRL-C to exit pick without choosing a file
  4. Quit vim

from pick.

teoljungberg avatar teoljungberg commented on August 20, 2024

An idea that @calleerlandsson and I talked about IRL is to explicitly reset the terminal when closing ncurses. Right now we configuring ncurses on boot: https://github.com/thoughtbot/pick/blob/0c03b0d76a8546016f824f7f977593fcbf1dab90/src/ui.c#L46-L65
Maybe doing the same on when we're stopping ncursise might do the trick?

from pick.

ggilder avatar ggilder commented on August 20, 2024

This is actually still happening for me... do you think there are any changes to the vim function needed? Here's what I'm using:

" pick
function! EscapeFilePath(path)
  return substitute(a:path, ' ', '\\ ', 'g')
endfunction

function! Pick(choice_command, vim_command)
  try
    let selection = system(a:choice_command . " | pick")
  catch /Vim:Interrupt/
    " Swallow the ^C so that the redraw below happens; otherwise there will be
    " UI leftovers on the screen
    redraw!
    return
  endtry
  redraw!
  if strlen(selection) > 0
    exec a:vim_command . " " . EscapeFilePath(selection)
  endif
endfunction

nnoremap <leader>t :call Pick("find * -type f", ":e")<cr>

from pick.

keith avatar keith commented on August 20, 2024

@ggilder see #32 you need to use pick -X

from pick.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.