Skip to content

Added HOME and END support to all editor boxes.#103

Open
chiefnoah wants to merge 1 commit into
asciimoo:masterfrom
chiefnoah:chiefnoah-patch-1
Open

Added HOME and END support to all editor boxes.#103
chiefnoah wants to merge 1 commit into
asciimoo:masterfrom
chiefnoah:chiefnoah-patch-1

Conversation

@chiefnoah

Copy link
Copy Markdown

Fixes #69

@marderchen

marderchen commented Aug 9, 2017 via email

Copy link
Copy Markdown

@asciimoo

Copy link
Copy Markdown
Owner

Ohi, thanks, it's a nice extension.
Some minor observations:

  • Wouldn't be better to scroll vertically in the output windows (response headers/body)?
  • Could you modify the code to be able to jump to the very end of the line, even if the line is longer than the window?

@asciimoo asciimoo left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

see comments

@chiefnoah

Copy link
Copy Markdown
Author

Wouldn't be better to scroll vertically in the output windows (response headers/body)?

I think that would make more sense if that was implemented using PageUp/PageDown. I will look into that.

Could you modify the code to be able to jump to the very end of the line, even if the line is longer than the window?

It does this already except in the response body and headers boxes, as those wrap when the line is wider than the window. I'll have to look at how the wrapping is implemented in the code to see if this can be done in a way that isn't messy.

@asciimoo

Copy link
Copy Markdown
Owner

I think that would make more sense if that was implemented using PageUp/PageDown. I will look into that.

Well, browsers work similarly as I described so it is pretty intuitive imho. When you hit "END" key it jumps to the bottom of the page except if the focus is on an input element. Also, PageUp/Down are already in use.

It does this already except in the response body and headers boxes, as those wrap when the line is wider than the window.

You're right, thanks.

@chiefnoah

Copy link
Copy Markdown
Author

I see what you mean. I should be able to add in similar logic to here to do that.

@asciimoo

Copy link
Copy Markdown
Owner

@chiefnoah any update on this?

@marderchen

marderchen commented Nov 15, 2017 via email

Copy link
Copy Markdown

@chiefnoah

Copy link
Copy Markdown
Author

@asciimoo I haven't had a chance to go back and look at it much. From what I could tell, there's no easy way to go to the end of a text area. It would require changes to gocui, as when I checked it didn't expose the number of lines in an edit window. This may have changed since I looked at it last. I should be able to revisit this in the near future.

@asciimoo

Copy link
Copy Markdown
Owner

it didn't expose the number of lines in an edit window

Worst case we can calculate it from the window's content and width.

I should be able to revisit this in the near future.

Awesome, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants