git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-gui: fix deleting from the context menu with empty selection

From
Shawn O. Pearce <spearce@spearce.org>
Date
Mar 30, 2009, 14:07 UTC
Message-ID
<20090330140750.GU23521@spearce.org>
In-Reply-To
<200903291629.23736.markus.heidelberg@web.de>
Markus Heidelberg <markus.heidelberg@web.de> wrote:
> An "Application Error" was raised when trying to delete text from the
> commit message field when no text was selected.
Thanks.
Show 13 quoted lines
> diff --git a/git-gui.sh b/git-gui.sh
> index 2f1f305..b3aa732 100755
> --- a/git-gui.sh
> +++ b/git-gui.sh
> @@ -2944,7 +2944,7 @@ $ctxm add command \
>  	-command {tk_textPaste $ui_comm}
>  $ctxm add command \
>  	-label [mc Delete] \
> -	-command {$ui_comm delete sel.first sel.last}
> +	-command {catch {$ui_comm delete sel.first sel.last}}
>  $ctxm add separator
>  $ctxm add command \
>  	-label [mc "Select All"] \
-- 
Shawn.
Message 1 of 1 in “Re: [PATCH] git-gui: fix deleting from the context menu with empty selection”
  1. Shawn O. PearceMar 30, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.