Visual Studio 垂直滚动条根据屏幕上的文本量更改长度 [英] Visual Studio vertical scrollbar changes length based on amount of text on-screen

查看:99
本文介绍了Visual Studio 垂直滚动条根据屏幕上的文本量更改长度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

[VS 企业版 2017,15.9.14]

[VS Enterprise 2017, 15.9.14]

我刚刚注意到这一点 - 不知道它发生了多久.当我编辑代码(我目前看到的任何类型 - 纯文本、.cs、.xaml)时,垂直滚动条将根据碰巧在窗口中可见的文本字符的相对数量改变长度.我不喜欢这个功能 - 我只希望大小保持不变,仅基于文件中的文本行数.我安装了许多扩展程序(仅举一例 Productivity Power Tools),但在选项"对话框中找不到任何相关设置.感谢您的任何意见.

I just noticed this - not sure how long it has been happening. When I am editing code (any type I have seen so far - plain text, .cs, .xaml) the vertical scroll bar will change length, based on the relative amount of text characters which happen to be visible in the window. I don't like this functionality - I just want the size to be constant, based solely on the number of lines of text in the file. I have a number of extensions installed (Productivity Power Tools to name one), but I couldn't find any relevant setting in the Options dialog. Thanks for any input.

推荐答案

我在 Visual Studio Professional 2019 中遇到了完全相同的问题.只有在我启用换行时才会发生.禁用换行 (Ctrl+E, Ctrl+W) 产生静态垂直滚动条长度(仅基于文件中的文本行数).我注意到实际上是否换行并不重要,但前提是启用了换行.

I encountered the exact same problem in Visual Studio Professional 2019. It only occurs if I have line wrapping enabled. Disabling line wrapping (Ctrl+E, Ctrl+W) yields static vertical scrollbar lengths (based solely on the number of lines of text in the file). I noticed that it does not matter if lines are actually wrapped but only if line wrapping is enabled.

我遇到了与原作者完全相同的问题,垂直滚动条根据可见字符的数量在单个文档内动态改变大小.我通过禁用换行解决了这个问题,并想与原作者和社区分享这个解决方案.

I encountered the exact same problem as the original author with vertical scroll bars changing size dynamically inside a single document depending on the amount of visible characters. I solved it by disabling line wrapping and wanted to share this solution with the original author and the community.

这篇关于Visual Studio 垂直滚动条根据屏幕上的文本量更改长度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆