java.lang.Object | |
↳ | jline.console.KillRing |
The kill ring class keeps killed text in a fixed size ring. In this class we also keep record of whether or not the last command was a kill or a yank. Depending on this, the class may behave different. For instance, two consecutive kill-word commands fill the same slot such that the next yank will return the two previously killed words instead that only the last one. Likewise yank pop requires that the previous command was either a yank or a yank-pop.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new kill ring of the given size.
| |||||||||||
Creates a new kill ring of the default size.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds the string to the kill-ring.
| |||||||||||
Adds the string to the kill-ring product of killing
backwards.
| |||||||||||
Returns
true if the last command was a yank. | |||||||||||
Resets the last-kill state.
| |||||||||||
Resets the last-yank state.
| |||||||||||
Yanks a previously killed text.
| |||||||||||
Moves the pointer to the current slot back and returns the text
in that position.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Creates a new kill ring of the given size.
Creates a new kill ring of the default size. .
Adds the string to the kill-ring. Also sets lastYank to false and lastKill to true.
Adds the string to the kill-ring product of killing backwards. If the previous command was a kill text one then adds the text at the beginning of the previous kill to avoid that two consecutive backwards kills followed by a yank leaves things reversed.
Returns true
if the last command was a yank.
Resets the last-kill state.
Resets the last-yank state.
Moves the pointer to the current slot back and returns the text in that position. If the previous command was not yank returns null.