Author Topic: Can't put 'p_buf_name_no_symlinks' into clipboard for read-only file?  (Read 133 times)

rowbearto

  • Senior Community Member
  • Posts: 887
  • Hero Points: 32
I created the below macro to copy the name of the current buffer with symlinks resolved into the clipboard:

Code: [Select]
_command void copy_buf_name_no_symlinks() name_info(',' VSARG2_REQUIRES_EDITORCTL)
{
    _copy_text_to_clipboard(p_buf_name_no_symlinks);
}

When I execute this macro when a read-only file is in the buffer, I get an error:

Quote
This command is not allowed in read only mode.

Is there any way I can get this fixed so that I can execute this macro also on a read-only file?

Thanks,
Rob

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1989
  • Hero Points: 91
Re: Can't put 'p_buf_name_no_symlinks' into clipboard for read-only file?
« Reply #1 on: February 06, 2018, 08:32:46 pm »
Try adding VSARG2_READ_ONLY to the name info at the top.

rowbearto

  • Senior Community Member
  • Posts: 887
  • Hero Points: 32
Re: Can't put 'p_buf_name_no_symlinks' into clipboard for read-only file?
« Reply #2 on: February 06, 2018, 08:39:04 pm »
That fixed it! Thanks!