RUBY-475 pin/unpin logic added to cursor