diff --git a/src/plugins/rx3270/sample/clipboard.rex b/src/plugins/rx3270/sample/clipboard.rex index 3f7b96d..8e8fc73 100644 --- a/src/plugins/rx3270/sample/clipboard.rex +++ b/src/plugins/rx3270/sample/clipboard.rex @@ -40,8 +40,15 @@ s = strip(left(text,field_len)) p = lastpos(" ",s) + n = pos(d2c(10),s) select + when n <> 0 then + do + s = strip(left(text,n-1)) + text = strip(substr(text,n+1)) + end + when length(text) < field_len then do s = strip(text) @@ -65,6 +72,7 @@ if next <= cursor then do /* Next field is before the original position */ + host~SetClipboard(text) return 0 end -- libgit2 0.21.2