Shell icon indicating copy to clipboard operation
Shell copied to clipboard

Clipboard.is_empty doesn't work as intended

Open andreaxhearts opened this issue 1 year ago • 1 comments

The clipboard function that is documented lists clipboard.is_empty, which is used to verify that there is a value stored in the clipboard. But regardless of if text is stored in the clipboard or not, it always returns 0.

item(title='clear clipboard ' + clipboard.is_empty cmd=clipboard.empty vis=if(clipboard.is_empty==1, 'hidden', 'normal'))

andreaxhearts avatar Sep 17 '24 19:09 andreaxhearts

There's a minor error in FuncExpression.cpp on line 738.

It should be _result = 1;

case IDENT_CLIPBOARD:
{
				switch(Id[1])
				{
					case IDENT_EMPTY:
						Text::Clipboard::Empty();
						break;
					case IDENT_IS_EMPTY:
					case IDENT_LEN:
					case IDENT_LENGTH:
					{
						_result = 1;

AlexW-13 avatar Oct 22 '24 01:10 AlexW-13