Fixes to ensure readonly() widget is not modified by destructive keyboard functions.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8106 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
843e1d8987
commit
e86b65c80a
@ -138,6 +138,7 @@ int Fl_Input::kf_page_down() {
|
|||||||
|
|
||||||
// Toggle insert mode
|
// Toggle insert mode
|
||||||
int Fl_Input::kf_insert_toggle() {
|
int Fl_Input::kf_insert_toggle() {
|
||||||
|
if (readonly()) { fl_beep(); return 1; }
|
||||||
return 1; // \todo: needs insert mode
|
return 1; // \todo: needs insert mode
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -159,6 +160,7 @@ int Fl_Input::kf_delete_word_left() {
|
|||||||
|
|
||||||
// Delete to start of line
|
// Delete to start of line
|
||||||
int Fl_Input::kf_delete_sol() {
|
int Fl_Input::kf_delete_sol() {
|
||||||
|
if (readonly()) { fl_beep(); return 1; }
|
||||||
if (mark() != position()) return cut();
|
if (mark() != position()) return cut();
|
||||||
cut(line_start(position()), position());
|
cut(line_start(position()), position());
|
||||||
return 1;
|
return 1;
|
||||||
@ -275,6 +277,7 @@ int Fl_Input::kf_undo() {
|
|||||||
|
|
||||||
// Redo. (currently unimplemented.. toggles undo() instead)
|
// Redo. (currently unimplemented.. toggles undo() instead)
|
||||||
int Fl_Input::kf_redo() {
|
int Fl_Input::kf_redo() {
|
||||||
|
if (readonly()) { fl_beep(); return 1; }
|
||||||
return kf_undo(); // currently we don't support multilevel undo
|
return kf_undo(); // currently we don't support multilevel undo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user