Skip to content

Conversation

@DanEble
Copy link
Contributor

@DanEble DanEble commented Nov 23, 2019

Q A
Bug fix? yes
New feature? no
BC breaks? (what is this?)
Deprecations? no
New tests added? no
Fixed tickets #1051
License MIT

Description

Long lines in code blocks are not wrapped; instead, a thin scroll bar is added when the content overflows. This scroll bar appears regardless of the user's preference for hiding the scroll bars of the main content window.

@Jocs
Copy link
Member

Jocs commented Nov 24, 2019

I prefer hide the horizontal scroll bar

屏幕快照 2019-11-24 下午11 44 46

@DanEble
Copy link
Contributor Author

DanEble commented Nov 25, 2019

I prefer hide the horizontal scroll bar

I guess we're at an impasse. I can't find an alternative that I like, but perhaps someone with more experience in this type of programming could find something that would satisfy both of us.

@Jocs
Copy link
Member

Jocs commented Nov 25, 2019 via email

@DanEble
Copy link
Contributor Author

DanEble commented Nov 25, 2019

The scroll bar gives an indication of how much content is out of view, which is valuable to me.

Would it be worthwhile to try making the scroll bar thinner? That's something I could investigate.

@Jocs
Copy link
Member

Jocs commented Nov 25, 2019

Would it be worthwhile to try making the scroll bar thinner?

How about set the scroll bar to 3~5px width?

@Jocs
Copy link
Member

Jocs commented Nov 25, 2019

BTW, A user setting option whether to wrap lines in code block is an optimization of this. What's your option?

@DanEble DanEble force-pushed the dev/issue-1051-block-code-nowrap branch from 383ee24 to aa2478f Compare November 25, 2019 19:55
@DanEble DanEble changed the title forbid line wrap in code blocks (#1051) Forbid line wrap in code blocks (#1051) Nov 25, 2019
@DanEble
Copy link
Contributor Author

DanEble commented Nov 25, 2019

I learned a few things today and made the following changes to this PR.

  • code blocks that are active for editing still use line wrapping
  • the user preference for hiding scroll bars does not affect code blocks
  • the size of the scroll bar is 3 px

BTW, A user setting option whether to wrap lines in code block is an optimization of this. What's your option?

I think that's a good idea, but I haven't tried it. Is it something you would like to see added to this PR, or could I leave it for someone else?

@Jocs
Copy link
Member

Jocs commented Nov 26, 2019

I think that's a good idea, but I haven't tried it. Is it something you would like to see added to this PR, or could I leave it for someone else?

Yes, this feature can be add in another PR.

Long lines in code blocks are not wrapped; instead, a thin scroll bar
is added when the content overflows.  This scroll bar appears
regardless of the user's preference for hiding the scroll bars of the
main content window.
@DanEble DanEble force-pushed the dev/issue-1051-block-code-nowrap branch from aa2478f to 993fed8 Compare November 26, 2019 17:38
@DanEble
Copy link
Contributor Author

DanEble commented Dec 17, 2019

@Jocs, I want to make sure that you're not waiting for me to do anything else in this PR. As far as I can see, I have addressed your concerns.

@Jocs
Copy link
Member

Jocs commented Feb 6, 2020

I want to make sure that you're not waiting for me to do anything else in this PR. As far as I can see, I have addressed your concerns.

Sorry for reply so late, because I am very busy in the past two months, I'll review it asap.

@Jocs Jocs merged commit 0aa0e04 into marktext:develop Feb 6, 2020
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.

2 participants