[Gambas-user] [Gambas Bug Tracker] Bug #1277: in special paste, this function could be interesting.
bugtracker at gambaswiki.org
bugtracker at gambaswiki.org
Mon Mar 26 02:36:16 CEST 2018
http://gambaswiki.org/bugtracker/edit?object=BUG.1277&from=L21haW4-
Víctor PEREZ reported a new bug.
Summary
-------
in special paste, this function could be interesting.
Type : Request
Priority : Low
Gambas version : 3.10
Product : Development Environment
Description
-----------
in special paste, this function could be interesting.
that allows you to easily put a large text in a variable and modify it to your liking.
Public Sub PasteStringSplitConcatened(sText As String)
Dim sLine As String
Dim sIndent As String
Dim bNext As Boolean
Dim aLines As String[] 'postapase
Dim iCont As Integer 'postapase
sLine = $hEditor.Current.Text
sIndent = Space$(Len(sLine) - Len(LTrim(sLine)))
aLines = Split(sText, "\n") 'postapase
$hEditor.Begin
'$hEditor.Goto($hEditor.Line, 0)
For Each sText In aLines
If bNext Then
If iCont = aLines.Max Then 'postapase
$hEditor.Insert("\n" & sIndent & " " & Quote(sText))
Else 'postapase
$hEditor.Insert("\n" & sIndent & " " & Quote(sText) & Chr(38)) 'postapase
Endif 'postapase
Else
If iCont = aLines.Max Then 'postapase
$hEditor.Insert(Quote(sText))
Else 'postapase
$hEditor.Insert(Quote(sText) & Chr(38)) 'postapase
Endif 'postapase
bNext = True
Endif
Inc iCont 'postapase
Next
$hEditor.End
End
System information
------------------
[System]
Gambas=3.10
OperatingSystem=Linux
Kernel=4.4.0-53-generic
Architecture=x86
Distribution=Linux Mint 18.1 Serena
Desktop=MATE
Theme=Gtk
Language=es_UY.UTF-8
Memory=1757M
[Libraries]
Cairo=libcairo.so.2.11400.6
Curl=libcurl.so.4.4.0
DBus=libdbus-1.so.3.14.6
GStreamer=libgstreamer-0.10.so.0.30.0
GStreamer=libgstreamer-1.0.so.0.803.0
GTK+2=libgtk-x11-2.0.so.0.2400.30
GTK+3=libgtk-3.so.0.1800.9
OpenGL=libGL.so.1.2.0
Poppler=libpoppler.so.58.0.0
QT4=libQtCore.so.4.8.7
QT5=libQt5Core.so.5.5.1
SDL=libSDL-1.2.so.0.11.4
SQLite=libsqlite3.so.0.8.6
More information about the User
mailing list