Skip to content
This repository has been archived by the owner on Jul 23, 2019. It is now read-only.

Buffer Selection Clipping #132

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ckissane
Copy link

  • Adds a clip_point function in xray_core/src/buffer.rs
  • Resolves 2 clipping related TODOs in xray_core/src/buffer_view.rs

@@ -271,11 +271,11 @@ impl BufferView {
}

pub fn set_cursor_position(&mut self, position: Point, autoscroll: bool) {
let clipped_point = self.buffer.borrow().clip_point(position);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you be cool just shadowing the original name position?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And what test coverage should be added?

@nathansobo
Copy link

Thanks for diving in on this. Cool that you saw a TODO and took it on. To merge this, we'll need some basic test coverage as well however.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants