Revision: 4422 http://vexi.svn.sourceforge.net/vexi/?rev=4422&view=rev Author: clrg Date: 2012-07-17 00:35:26 +0000 (Tue, 17 Jul 2012) Log Message: ----------- Minor
Modified Paths: -------------- trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/textarea.t Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/textarea.t =================================================================== --- trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/textarea.t 2012-07-17 00:09:40 UTC (rev 4421) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/textarea.t 2012-07-17 00:35:26 UTC (rev 4422) @@ -32,8 +32,6 @@ static.keypressWrite = function(v) { cascade = v; trapee.v_edit.KeyPressed = v; - if (v.indexOf("C-"!=0)) - trapee.text = trapee.text; } /** set up editbox */ @@ -54,16 +52,21 @@ if (!focused) { trapee.value = trapee.value; } else if (focused and cursor!=null and scroll!=null) { - var targ = trapee; - - /** syncs the view to be make sure the cursor is visible */ - var sync = function(v) { - cascade = v; - if (!scroll) return; - if (scroll.viewy > v) - scroll.viewy = v; - else if (v + targ.height + 6 > scroll.viewheight + scroll.viewy) - scroll.viewy = v + 6 + targ.height - scroll.viewheight; + /** syncs the view to be make sure the cursor is visible */ + var sync = function(v) { + cascade = v; + // .-------------. edit/view - + // | | | viewy + // .-+-------------+-. - + // | | | | viewport | viewheight + // | | | | | + // '-+-------------+-' - + // | | + // '-------------' + if (scroll.viewy > v) + scroll.viewy = v; + else if (v + cursor.height + 6 > scroll.viewy + scroll.viewheight) + scroll.viewy = v + 6 + cursor.height - scroll.viewheight; } // assign trap cursor.y ++= sync; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn