Skip to main content
clarify
Source Link
3N4N
  • 5.9k
  • 1
  • 21
  • 49

Even though it doesn't show in the output of :display, when you use the plus or star registers in TTS (i.e., a mode without clipboard feature), it stores the content in the 0 register. The code is in the get_yank_register function.

If we see the else condition, which is what gets executed in TTY mode for star and plus register (I double-checked with gdb), we'll see it sets the register being handled to 0.

else        // not 0-9, a-z, A-Z or '-': use register 0
    i = 0;

The same is true when you're pasting the content (the argument writing is false in that case, everything else is the same).

Why the 0 register doesn't display it until it is pasted into a buffer is still a mystery to me. I'll look around and update this answer if/when I find that answer.

Even though it doesn't show in the output of :display, when you use the plus or star registers in TTS (i.e., a mode without clipboard feature), it stores the content in the 0 register. The code is in the get_yank_register function.

If we see the else condition, which is what gets executed in TTY mode for star and plus register (I double-checked with gdb), we'll see it sets the register being handled to 0.

else        // not 0-9, a-z, A-Z or '-': use register 0
    i = 0;

The same is true when you're pasting the content (the argument writing is false in that case, everything else is the same).

Why the 0 register doesn't display it is still a mystery to me. I'll look around and update this answer if/when I find that answer.

Even though it doesn't show in the output of :display, when you use the plus or star registers in TTS (i.e., a mode without clipboard feature), it stores the content in the 0 register. The code is in the get_yank_register function.

If we see the else condition, which is what gets executed in TTY mode for star and plus register (I double-checked with gdb), we'll see it sets the register being handled to 0.

else        // not 0-9, a-z, A-Z or '-': use register 0
    i = 0;

The same is true when you're pasting the content (the argument writing is false in that case, everything else is the same).

Why the 0 register doesn't display it until it is pasted into a buffer is still a mystery to me. I'll look around and update this answer if/when I find that answer.

Source Link
3N4N
  • 5.9k
  • 1
  • 21
  • 49

Even though it doesn't show in the output of :display, when you use the plus or star registers in TTS (i.e., a mode without clipboard feature), it stores the content in the 0 register. The code is in the get_yank_register function.

If we see the else condition, which is what gets executed in TTY mode for star and plus register (I double-checked with gdb), we'll see it sets the register being handled to 0.

else        // not 0-9, a-z, A-Z or '-': use register 0
    i = 0;

The same is true when you're pasting the content (the argument writing is false in that case, everything else is the same).

Why the 0 register doesn't display it is still a mystery to me. I'll look around and update this answer if/when I find that answer.