GNU bug report logs - #79259
[PATCH] Fix arg doc off-by-one bug of eglot signature help

Previous Next

Package: emacs;

Reported by: Lin Jian <me <at> linj.tech>

Date: Sat, 16 Aug 2025 21:49:01 UTC

Severity: normal

Tags: patch

Done: João Távora <joaotavora <at> gmail.com>

Full log


View this message in rfc822 format

From: Lin Jian <me <at> linj.tech>
To: João Távora <joaotavora <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 79259-done <at> debbugs.gnu.org
Subject: bug#79259: [PATCH] Fix arg doc off-by-one bug of eglot signature help
Date: Wed, 03 Sep 2025 14:52:23 +0800
João Távora <joaotavora <at> gmail.com> writes:

> Is this number 0-indexed?  Hard to say, reading
> https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_signatureHelp

I think it is 0-indexed.  I have verified that using vscode and
rust-analyzer.

> Anyway, I pushed a slightly simpler fix.

That slightly simpler "fix" changes an unrelated line of code.  It
introduces a new off-by-1 bug while keeping the off-by-1 bug my patch
indents to fix unchanged.

There are 3 things here:

1. `add-face-text-property' is 1-indexed
2. `substring' is 0-indexed
3. label offsets of ParameterInformation are 0-indexed

My patch fixes the mis-match of 2 and 3, while the slightly simpler
"fix" changes the correct match of 1 and 3.




This bug report was last modified 8 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.