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

Clipboard.is_empty doesn't work as intended #515

Open
andreaxhearts opened this issue Sep 17, 2024 · 1 comment
Open

Clipboard.is_empty doesn't work as intended #515

andreaxhearts opened this issue Sep 17, 2024 · 1 comment

Comments

@andreaxhearts
Copy link

andreaxhearts commented Sep 17, 2024

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'))

@AlexW-13
Copy link

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;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants