Coder Social home page Coder Social logo

Comments (14)

chrisbra avatar chrisbra commented on May 24, 2024 1

I reverted back the check. Please next time create a new issue

from vim.

znsoooo avatar znsoooo commented on May 24, 2024

And I an already fixed this bug: 1d9f46b

Can I pull request into master?

from vim.

chrisbra avatar chrisbra commented on May 24, 2024

You can create a pull request, but using the unnamed register is something very different then using the (system) wide clipboard.

from vim.

znsoooo avatar znsoooo commented on May 24, 2024

You can create a pull request, but using the unnamed register is something very different then using the (system) wide clipboard.

Yes, so it only takes effect when the system clipboard is not available.

from vim.

ciupicri avatar ciupicri commented on May 24, 2024

@clason the patch breaks gvim (vim-X11-9.1.158-1.fc39.x86_64) when running under X11 (XFCE) on Fedora Linux. The keyboard shortcuts don't work anymore.

from vim.

chrisbra avatar chrisbra commented on May 24, 2024

what exactly does not work?

from vim.

ciupicri avatar ciupicri commented on May 24, 2024

For example if I select some text in gvim and press Control+C , then Control+V in say Firefox the old content of the clipboard gets pasted. This means that the copy operation didn't put something new into the clipboard, i.e. it doesn't work.

On the other hand, select, right click → Copy works fine.


$ cat ~/.vim/vimrc
source $VIMRUNTIME/mswin.vim

from vim.

chrisbra avatar chrisbra commented on May 24, 2024

Please give more information.
So you are visual selecting anything and press <c-c>? What does :vnoremap <c-c> give you? What about :echo has("clipboard_working")?

If you change line 27 from:

if has("clipboard_working")

to

if has("clipboard")

Does it start working?

from vim.

ciupicri avatar ciupicri commented on May 24, 2024

So you are visual selecting anything and press <c-c>?

Yes. Either with the mouse or the keyboard by pressing Shift.

What does :vnoremap <c-c> give you?

v  <C-C>       * y

What about :echo has("clipboard_working")?

1

If you change line 27 […] does it start working?

Yes.

--- /usr/share/vim/vim91/mswin.vim	2024-03-08 02:00:00.000000000 +0200
+++ mswin.vim	2024-03-13 15:56:52.316998206 +0200
@@ -24,7 +24,7 @@
 " backspace in Visual mode deletes selection
 vnoremap <BS> d
 
-if has("clipboard_working")
+if has("clipboard")
     " CTRL-X and SHIFT-Del are Cut
     vnoremap <C-X> "+x
     vnoremap <S-Del> "+x

from vim.

ciupicri avatar ciupicri commented on May 24, 2024

P.S. Pressing Control+V outputs ^ and then vim waits for another key press.

The Paste from the right click menu works fine.

from vim.

chrisbra avatar chrisbra commented on May 24, 2024

v * y

Wait what? Where does that come from? Do you have this in your runtime file? Please show the output of :verbose :vmap <c-c>

:echo has("clipboard_working")
1

Hm, perhaps clipboard is not yet working when sourcing mswin.vim ? Maybe this should be defered until the gui has started up?

P.S. Pressing Control+V outputs ^ and then vim waits for another key press.

That is expected. See :h i_CTRL_V (this also works similar in other modes).

from vim.

ciupicri avatar ciupicri commented on May 24, 2024

Please show the output of :verbose :vmap <c-c>

Seen modifyOtherKeys: true
x  gx            <Plug>NetrwBrowseXVis
        Last set from /usr/share/vim/vim91/plugin/netrwPlugin.vim line 89
x  <Plug>NetrwBrowseXVis * :<C-U>call netrw#BrowseXVis()<CR>
        Last set from /usr/share/vim/vim91/plugin/netrwPlugin.vim line 91
   <C-F>       * has("gui_running") ? ":promptfind\<CR>" : "/"
        Last set from ~/.vim/mswin.vim line 127
nv <C-F4>      * <C-W>c
        Last set from ~/.vim/mswin.vim line 120
nv <C-Tab>     * <C-W>w
        Last set from ~/.vim/mswin.vim line 114
x  <C-A>       * <C-C>ggVG
        Last set from ~/.vim/mswin.vim line 111
s  <C-A>       * <C-C>gggH<C-O>G
        Last set from ~/.vim/mswin.vim line 110
   <M-Space>   * :simalt ~<CR>
        Last set from ~/.vim/mswin.vim line 100
   <C-Y>       * <C-R>
        Last set from ~/.vim/mswin.vim line 95
   <C-Z>       * u
        Last set from ~/.vim/mswin.vim line 91
v  <C-S>       * <C-C>:update<CR>
        Last set from ~/.vim/mswin.vim line 81
   <C-Q>       * <C-V>
        Last set from ~/.vim/mswin.vim line 76
v  <S-Insert>    <C-V>
        Last set from ~/.vim/mswin.vim line 73
   <C-V>         "+gP
        Last set from ~/.vim/mswin.vim line 37
v  <C-Insert>  * "+y
        Last set from ~/.vim/mswin.vim line 34
v  <C-C>       * "+y
        Last set from ~/.vim/mswin.vim line 33
v  <S-Del>     * "+x
        Last set from ~/.vim/mswin.vim line 30
v  <C-X>       * "+x
        Last set from ~/.vim/mswin.vim line 29
v  <BS>        * d
        Last set from ~/.vim/mswin.vim line 25

Control+V used to work as on Windows (Notepad).

from vim.

chrisbra avatar chrisbra commented on May 24, 2024

Ah, so this must be your patched/working version.

from vim.

ciupicri avatar ciupicri commented on May 24, 2024

Yeah, with the patch proposed by you.

from vim.

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.