octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #47927] Ctrl+C crashes Octave on MacOS


From: Pantxo Diribarne
Subject: [Octave-bug-tracker] [bug #47927] Ctrl+C crashes Octave on MacOS
Date: Tue, 30 Aug 2016 20:26:07 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0

Follow-up Comment #7, bug #47927 (project octave):

@Ben: about comment #6, are you running pure cli or "--no-gui"?

I wanted to comment on the suspicious code below (from TerminalView.cc):


void TerminalView::copyClipboard(bool extra_interrupt)
{
  if ( !_screenWindow || !hasFocus())
    return;

  QString text = _screenWindow->selectedText(_preserveLineBreaks);

  if (text.isEmpty ())
    {
      if (! extra_interrupt)
        emit interrupt_signal ();
    }
  else
    QApplication::clipboard()->setText(text);
}



In Octave Ctrl+C is ubiquitous: 
* it is the default shortcut for "copy to clipboard" *on all platforms but
Mac*. On Mac I'd expect CTRL+C not to be caught by Octave (as copyClipboard is
CMD+C).
@Ben: does CMD+C have any effect in the terminal? in the terminal preferences
tab, is the option "Disable global shortcuts ..." checked? Can you try to
change the shortcut for copyClipboard to CTRL+C, and eventually play with the
above option?

* in the command window it means "interrupt unless text selected".  
Instead of watching copyClipboard events, we should watch actual CTRL+C
keyboard events and decide what to do if CTRL+C is actually the shortcut for
copyClipboard.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?47927>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]