Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HoverProvider area is tiny for empty lines #47660

Closed
guillaumejenkins opened this issue Apr 11, 2018 · 2 comments
Closed

HoverProvider area is tiny for empty lines #47660

guillaumejenkins opened this issue Apr 11, 2018 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@guillaumejenkins
Copy link
Contributor

The "hoverable area" that triggers a HoverProvider on an empty line is very small. The cursor needs to be exactly to the right of the left gutter.

Would it be possible to make that area larger so it is easier to hit?

VS Code version: Code 1.22.1 (950b8b0, 2018-04-06T02:26:57.615Z)
OS version: Windows_NT x64 10.0.16299

@alexdima
Copy link
Member

Yeah, I think we could make that area at least 1 character wide on an empty line.

@vscodebot vscodebot bot removed the new release label Apr 12, 2018
@alexdima
Copy link
Member

Repro steps:

  • package.json:
{
    "publisher": "alex",
    "name": "47660",
    "version": "0.0.0",
    "engines": {
        "vscode": "^1.0.0"
    },
    "activationEvents": [
        "*"
    ],
    "main": "index.js"
}
  • index.js:
const vscode = require('vscode');
const path = require('path');

exports.activate = function () {

	vscode.languages.registerHoverProvider('plaintext', {
		provideHover(document, position) {
			return new vscode.Hover({
				value: `HOVER INVOKED AT ${JSON.stringify(position)}`,
				isTrusted: true
			});
		}
	});
}

  • test.txt:
JUST A FILE

WITH SOME TEXT

The hover should show even when hovering very close to the line endings, for a half of a character more. This is especially helpful for empty lines.

@alexdima alexdima added the bug Issue identified by VS Code Team member as probable bug label Apr 23, 2018
@mjbvz mjbvz added the verified Verification succeeded label Apr 26, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants