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


Message #19 received at 79259-done <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Lin Jian <me <at> linj.tech>, 79259-done <at> debbugs.gnu.org
Subject: Re: bug#79259: [PATCH] Fix arg doc off-by-one bug of eglot
 signature help
Date: Sat, 30 Aug 2025 11:46:42 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

> João, are you okay with the patch, given the additional information
> posted by Lin Jian?

The patch is OK in spirit, but I think it can be made simpler.

Anyway was added much ealier than
e33c0a549153fa3894f3b5e9c5e42ce07a1a68c7, in this commit:

   commit 9cedae50a27f0d0d6adee82976654d63c9f67602
   Date:   Wed Jan 9 21:09:35 2019 +0000
    
       Handle label offsets in parameterinformation
       
       At least ccls uses this.

So, I think it's more likely thatn not that we will be breaking ccls, or
at least the 2019 ccls.  Is this number 0-indexed?  Hard to say, reading
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_signatureHelp

However, if it's not 0-indexed, it is 1-indexed at most.  Therefore the
use of '1+' to _add_ to the server-supplied number definitely looks
wrong.  Though, again, it is probably wrong to accomodate exactly 2019
ccls, one of the few servers at the time that used this exotic new
feature.

Anyway, I pushed a slightly simpler fix.  I'm closing this issue.  If
the problem persists, we can reopen.

João




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.